diff --git a/src/js/pagestore.js b/src/js/pagestore.js index a9dff032b..fa6805bf9 100644 --- a/src/js/pagestore.js +++ b/src/js/pagestore.js @@ -95,6 +95,7 @@ NetFilteringResultCache.prototype.rememberResult = function( result, logData ) { + if ( fctxt.tabId <= 0 ) { return; } if ( this.results.size === 0 ) { this.pruneAsync(); } @@ -113,6 +114,7 @@ NetFilteringResultCache.prototype.rememberResult = function( /******************************************************************************/ NetFilteringResultCache.prototype.rememberBlock = function(fctxt) { + if ( fctxt.tabId <= 0 ) { return; } if ( this.blocked.size === 0 ) { this.pruneAsync(); } diff --git a/src/js/traffic.js b/src/js/traffic.js index a6c7283f7..355f1a30b 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -283,7 +283,14 @@ const onBeforeBehindTheSceneRequest = function(fctxt) { let result = 0; + // https://github.com/uBlockOrigin/uBlock-issues/issues/339 + // Need to also test against `-scheme` since tabOrigin is normalized. + // Not especially elegant but for now this accomplishes the purpose of + // not dealing with network requests fired from a synthetic scope, + // that is unless advanced user mode is enabled. + if ( + fctxt.tabOrigin.endsWith('-scheme') === false && µb.URI.isNetworkURI(fctxt.tabOrigin) || µb.userSettings.advancedUserEnabled || fctxt.type === 'csp_report' @@ -303,8 +310,6 @@ const onBeforeBehindTheSceneRequest = function(fctxt) { } } - pageStore.journalAddRequest(fctxt.getHostname(), result); - if ( µb.logger.enabled ) { fctxt.setRealm('net').toLogger(); } diff --git a/src/logger-ui.html b/src/logger-ui.html index 5a01029f5..25c4cbf32 100644 --- a/src/logger-ui.html +++ b/src/logger-ui.html @@ -19,7 +19,7 @@ - +