From dd2a9faa4c024b8f87fa09b42ed542521c69ddc9 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 26 Oct 2019 10:18:32 -0400 Subject: [PATCH] Use request as its own context when none available Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/dn9zso/ When a network request is tabless and contextless, i.e. `tabId === -1` and `frameId === -1`, use the URL of the network request as the context. --- src/js/filtering-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/filtering-context.js b/src/js/filtering-context.js index 7a09bf7a8..0761aa571 100644 --- a/src/js/filtering-context.js +++ b/src/js/filtering-context.js @@ -91,7 +91,7 @@ µBlock.normalizePageURL(0, details.documentUrl) ); this.setDocOrigin(origin).setTabOrigin(origin); - } else if ( this.type.endsWith('_frame') ) { + } else if ( this.docId === -1 || this.type.endsWith('_frame') ) { const origin = this.originFromURI(this.url); this.setDocOrigin(origin).setTabOrigin(origin); } else {