From 1db54c47e134c1f093fa4e7aeed7caf902e286a3 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 30 Jan 2024 20:52:07 -0500 Subject: [PATCH] Fix the logging of all `prevent-xhr` calls Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/3096#discussioncomment-8309729 --- assets/resources/scriptlets.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 3ce782539..7aae194c3 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -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);