mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Improve loggger output of prevent-fetch
scriptlet
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/3115
This commit is contained in:
parent
246ae91c79
commit
6551cab525
1 changed files with 5 additions and 4 deletions
|
@ -1997,10 +1997,6 @@ function noFetchIf(
|
||||||
const details = args[0] instanceof self.Request
|
const details = args[0] instanceof self.Request
|
||||||
? args[0]
|
? args[0]
|
||||||
: Object.assign({ url: args[0] }, args[1]);
|
: Object.assign({ url: args[0] }, args[1]);
|
||||||
if ( propsToMatch === '' && responseBody === '' ) {
|
|
||||||
safe.uboLog(logPrefix, `Called: ${safe.JSON_stringify(details, null, 2)}`);
|
|
||||||
return Reflect.apply(target, thisArg, args);
|
|
||||||
}
|
|
||||||
let proceed = true;
|
let proceed = true;
|
||||||
try {
|
try {
|
||||||
const props = new Map();
|
const props = new Map();
|
||||||
|
@ -2013,6 +2009,11 @@ function noFetchIf(
|
||||||
if ( typeof v !== 'string' ) { continue; }
|
if ( typeof v !== 'string' ) { continue; }
|
||||||
props.set(prop, v);
|
props.set(prop, v);
|
||||||
}
|
}
|
||||||
|
if ( propsToMatch === '' && responseBody === '' ) {
|
||||||
|
const out = Array.from(props).map(a => `${a[0]}:${a[1]}`);
|
||||||
|
safe.uboLog(logPrefix, `Called: ${out.join('\n')}`);
|
||||||
|
return Reflect.apply(target, thisArg, args);
|
||||||
|
}
|
||||||
proceed = needles.length === 0;
|
proceed = needles.length === 0;
|
||||||
for ( const { key, re } of needles ) {
|
for ( const { key, re } of needles ) {
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in a new issue