mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 08:37:11 +02:00
Improve logging information in prevent-window-open
scriptlet
This commit is contained in:
parent
28e1424058
commit
b4da81f8d4
@ -2679,9 +2679,12 @@ function noWindowOpenIf(
|
|||||||
apply: function(target, thisArg, args) {
|
apply: function(target, thisArg, args) {
|
||||||
const haystack = args.join(' ');
|
const haystack = args.join(' ');
|
||||||
if ( rePattern.test(haystack) !== targetMatchResult ) {
|
if ( rePattern.test(haystack) !== targetMatchResult ) {
|
||||||
|
if ( safe.logLevel > 1 ) {
|
||||||
|
safe.uboLog(logPrefix, `Allowed (${args.join(', ')})`);
|
||||||
|
}
|
||||||
return Reflect.apply(target, thisArg, args);
|
return Reflect.apply(target, thisArg, args);
|
||||||
}
|
}
|
||||||
safe.uboLog(logPrefix, 'Prevented');
|
safe.uboLog(logPrefix, `Prevented (${args.join(', ')})`);
|
||||||
if ( autoRemoveAfter < 0 ) { return null; }
|
if ( autoRemoveAfter < 0 ) { return null; }
|
||||||
const decoyElem = decoy === 'obj'
|
const decoyElem = decoy === 'obj'
|
||||||
? createDecoy('object', 'data', ...args)
|
? createDecoy('object', 'data', ...args)
|
||||||
|
Loading…
Reference in New Issue
Block a user