mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
This commit is contained in:
parent
31bea1d08b
commit
a2caf3c42d
2 changed files with 15 additions and 2 deletions
|
@ -691,7 +691,17 @@ var collapsibleRequestTypes = 'image sub_frame object';
|
|||
|
||||
PageStore.prototype.filterRequestNoCache = function(context) {
|
||||
|
||||
if ( this.getNetFilteringSwitch() === false ) {
|
||||
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
||||
// Not ideal, but until something better is figured, this solves the issue.
|
||||
// This works so long as there is no `rootURL` property added to the page
|
||||
// store. Long term, I have some ideas I would like to test to take care
|
||||
// of those cases for which a page store may not have been definitely
|
||||
// bound to a tab.
|
||||
if ( typeof context.rootURL === 'string' ) {
|
||||
if ( µb.getNetFilteringSwitch(context.rootURL) === false ) {
|
||||
return '';
|
||||
}
|
||||
} else if ( this.getNetFilteringSwitch() === false ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -383,7 +383,10 @@ var onHeadersReceived = function(details) {
|
|||
var context;
|
||||
if ( details.parentFrameId === -1 ) {
|
||||
var contextDomain = µb.URI.domainFromHostname(requestHostname);
|
||||
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
||||
// Adding `rootURL` solves the issue.
|
||||
context = {
|
||||
rootURL: requestURL,
|
||||
rootHostname: requestHostname,
|
||||
rootDomain: contextDomain,
|
||||
pageHostname: requestHostname,
|
||||
|
@ -401,7 +404,7 @@ var onHeadersReceived = function(details) {
|
|||
context.requestHostname = requestHostname;
|
||||
context.requestType = 'inline-script';
|
||||
|
||||
var result = pageStore.filterRequest(context);
|
||||
var result = pageStore.filterRequestNoCache(context);
|
||||
|
||||
pageStore.logRequest(context, result);
|
||||
|
||||
|
|
Loading…
Reference in a new issue