mirror of https://github.com/gorhill/uBlock.git
Fix the logging of all `prevent-xhr` calls
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/3096#discussioncomment-8309729
This commit is contained in:
parent
1e614a7b10
commit
1db54c47e1
|
@ -2525,11 +2525,12 @@ function noXhrIf(
|
|||
return super.open(method, url, ...args);
|
||||
}
|
||||
const haystack = { method, url };
|
||||
if ( matchObjectProperties(propNeedles, haystack) ) {
|
||||
xhrInstances.set(this, haystack);
|
||||
}
|
||||
if ( propsToMatch === '' && directive === '' ) {
|
||||
safe.uboLog(logPrefix, `Called: ${safe.JSON_stringify(haystack, null, 2)}`);
|
||||
return super.open(method, url, ...args);
|
||||
}
|
||||
if ( matchObjectProperties(propNeedles, haystack) ) {
|
||||
xhrInstances.set(this, haystack);
|
||||
}
|
||||
haystack.headers = Object.assign({}, headers);
|
||||
return super.open(method, url, ...args);
|
||||
|
|
Loading…
Reference in New Issue