From 8f32bee8b9f351b233d92304951dfce180390a07 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 28 Feb 2023 20:08:31 -0500 Subject: [PATCH] Restore behind-the-scene origin for docless secondary resources Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2515 --- src/js/background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/background.js b/src/js/background.js index 77e042462..9a4fa2b34 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -336,7 +336,9 @@ const µBlock = { // jshint ignore:line this.setDocOrigin(origin).setTabOrigin(origin); return this; } - const origin = originFromURI(this.url); + const origin = (this.itype & this.FRAME_ANY) !== 0 + ? originFromURI(this.url) + : this.tabOrigin; this.setDocOrigin(origin).setTabOrigin(origin); return this; }