mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Improve logging information in prevent-window-open scriptlet
This commit is contained in:
parent
28e1424058
commit
b4da81f8d4
1 changed files with 4 additions and 1 deletions
|
|
@ -2679,9 +2679,12 @@ function noWindowOpenIf(
|
|||
apply: function(target, thisArg, args) {
|
||||
const haystack = args.join(' ');
|
||||
if ( rePattern.test(haystack) !== targetMatchResult ) {
|
||||
if ( safe.logLevel > 1 ) {
|
||||
safe.uboLog(logPrefix, `Allowed (${args.join(', ')})`);
|
||||
}
|
||||
return Reflect.apply(target, thisArg, args);
|
||||
}
|
||||
safe.uboLog(logPrefix, 'Prevented');
|
||||
safe.uboLog(logPrefix, `Prevented (${args.join(', ')})`);
|
||||
if ( autoRemoveAfter < 0 ) { return null; }
|
||||
const decoyElem = decoy === 'obj'
|
||||
? createDecoy('object', 'data', ...args)
|
||||
|
|
|
|||
Loading…
Reference in a new issue