diff options
author | gorhill <rhill@raymondhill.net> | 2015-04-07 21:26:13 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-04-07 21:26:13 -0400 |
commit | a2caf3c42dfa21183954fd6cdfc220c5645e742f (patch) | |
tree | 3e5632ccfbf69d8facef114cf6dc884bd31a5783 /src/js/pagestore.js | |
parent | 31bea1d08bd892f99426046895d3c393491f17d8 (diff) | |
download | uBlock-a2caf3c42dfa21183954fd6cdfc220c5645e742f.zip uBlock-a2caf3c42dfa21183954fd6cdfc220c5645e742f.tar.gz uBlock-a2caf3c42dfa21183954fd6cdfc220c5645e742f.tar.bz2 |
this fixes https://github.com/chrisaljoudi/uBlock/issues/1205
Diffstat (limited to 'src/js/pagestore.js')
-rw-r--r-- | src/js/pagestore.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/js/pagestore.js b/src/js/pagestore.js index 91af6b1..eb37bb3 100644 --- a/src/js/pagestore.js +++ b/src/js/pagestore.js @@ -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 ''; } |