Skip to content

Commit

Permalink
Use request as its own context when none available
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gorhill committed Oct 26, 2019
1 parent 30393fd commit dd2a9fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/filtering-context.js
Expand Up @@ -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 {
Expand Down

0 comments on commit dd2a9fa

Please sign in to comment.