diff options
author | gorhill <rhill@raymondhill.net> | 2015-08-17 15:09:14 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-08-17 15:09:14 -0400 |
commit | ccb058c2d96908060adc5a0209ca7bd293392d5d (patch) | |
tree | 41ea605127f8d31a1f1b1e6bf707af53053e1aca /src | |
parent | 096e85f313a53a8af2f644d0f185f7feb682409d (diff) | |
download | uBlock-ccb058c2d96908060adc5a0209ca7bd293392d5d.zip uBlock-ccb058c2d96908060adc5a0209ca7bd293392d5d.tar.gz uBlock-ccb058c2d96908060adc5a0209ca7bd293392d5d.tar.bz2 |
this fixes #581
Diffstat (limited to 'src')
-rw-r--r-- | src/js/tab.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/js/tab.js b/src/js/tab.js index 34ac750..9a90c2b 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -496,8 +496,8 @@ vAPI.tabs.onPopup = function(details) { requestType: 'popup' }; + var pageStore = µb.pageStoreFromTabId(details.openerTabId); var result = ''; - var loggerEnabled = µb.logger.isEnabled(); // Check user switch first if ( µb.hnSwitches.evaluateZ('no-popups', openerHostname) ) { @@ -506,22 +506,19 @@ vAPI.tabs.onPopup = function(details) { // https://github.com/chrisaljoudi/uBlock/issues/323 // https://github.com/chrisaljoudi/uBlock/issues/1142 - // Don't block if uBlock is turned off in popup's context - if ( - result === '' && - µb.getNetFilteringSwitch(targetURL) && - µb.staticNetFilteringEngine.matchStringExactType(context, targetURL, 'popup') !== undefined - ) { - result = µb.staticNetFilteringEngine.toResultString(loggerEnabled); + // Don't block if uBlock is turned off in popup's context + // https://github.com/gorhill/uBlock/issues/581 + // Take into account dynamic filtering. + if ( result === '' && pageStore && µb.getNetFilteringSwitch(targetURL) ) { + result = pageStore.filterRequestNoCache(context); } // https://github.com/chrisaljoudi/uBlock/issues/91 - var pageStore = µb.pageStoreFromTabId(details.openerTabId); if ( pageStore ) { pageStore.logRequest(context, result); } - if ( loggerEnabled ) { + if ( µb.logger.isEnabled() ) { µb.logger.writeOne( details.openerTabId, 'net', |