1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-18 17:02:27 +02:00

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.
This commit is contained in:
Raymond Hill 2019-10-26 10:18:32 -04:00
parent 30393fdcf1
commit dd2a9faa4c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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 {