1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Postprocess selections only from from logger entries

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3097
This commit is contained in:
Raymond Hill 2024-01-28 11:17:36 -05:00
parent 6cfba082f9
commit 59d46ecd78
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3045,11 +3045,11 @@ dom.on('#logLevel', 'click', ev => {
broadcast({ what: 'loggerLevelChanged', level }); broadcast({ what: 'loggerLevelChanged', level });
}); });
dom.on('#netInspector', 'copy', ev => { dom.on('#netInspector #vwContent', 'copy', ev => {
const selection = document.getSelection(); const selection = document.getSelection();
ev.clipboardData.setData('text/plain', const text = selection.toString();
selection.toString().replace(/\x1F|\u200B/g, '\t') if ( /\x1F|\u200B/.test(text) === false ) { return; }
); ev.clipboardData.setData('text/plain', text.replace(/\x1F|\u200B/g, '\t'));
ev.preventDefault(); ev.preventDefault();
}); });