From 9701a519a247db85e919838b2c1dc3812de0b3de Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 9 Jul 2017 06:58:34 -0400 Subject: [PATCH] really fix #2776 --- src/js/tab.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js/tab.js b/src/js/tab.js index 950039695..e7a75f5a7 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -704,9 +704,6 @@ vAPI.tabs.onPopupUpdated = (function() { }; return function(targetTabId, openerTabId) { - // https://github.com/gorhill/uBlock/issues/2776 - logData = undefined; - // Opener details. var tabContext = µb.tabContextManager.lookup(openerTabId); if ( tabContext === null ) { return; } @@ -752,16 +749,18 @@ vAPI.tabs.onPopupUpdated = (function() { } // Log only for when there was a hit against an actual filter (allow or block). + // https://github.com/gorhill/uBlock/issues/2776 if ( µb.logger.isEnabled() ) { µb.logger.writeOne( popupType === 'popup' ? openerTabId : targetTabId, 'net', - logData, + result !== 0 ? logData : undefined, popupType, popupType === 'popup' ? targetURL : openerURL, µb.URI.hostnameFromURI(context.rootURL), µb.URI.hostnameFromURI(context.rootURL) ); + logData = undefined; } // Not blocked