1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-23 19:03:02 +01:00
This commit is contained in:
gorhill 2015-04-07 21:26:13 -04:00
parent 31bea1d08b
commit a2caf3c42d
2 changed files with 15 additions and 2 deletions

View File

@ -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 '';
}

View File

@ -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);