From 543c3530b5f3b71321f5503b6b2a9afd1efcd120 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 27 Mar 2015 14:59:17 -0400 Subject: [PATCH] this fixes #1106 --- src/js/tab.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/js/tab.js b/src/js/tab.js index 77190e9df..93c19ad48 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -103,13 +103,6 @@ vAPI.tabs.onPopup = function(details) { var openerHostname = µburi.hostnameFromURI(openerURL); var openerDomain = µburi.domainFromHostname(openerHostname); - var context = { - pageHostname: openerHostname, - pageDomain: openerDomain, - rootHostname: openerHostname, - rootDomain: openerDomain - }; - var targetURL = details.targetURL; // If the page URL is that of our "blocked page" URL, extract the URL of @@ -121,6 +114,16 @@ vAPI.tabs.onPopup = function(details) { } } + var context = { + pageHostname: openerHostname, + pageDomain: openerDomain, + rootHostname: openerHostname, + rootDomain: openerDomain, + requestURL: targetURL, + requestHostname: µb.URI.hostnameFromURI(targetURL), + requestType: 'popup' + }; + var result = ''; // Check user switch first @@ -136,11 +139,7 @@ vAPI.tabs.onPopup = function(details) { // https://github.com/gorhill/uBlock/issues/91 if ( pageStore ) { - pageStore.logRequest({ - requestURL: targetURL, - requestHostname: µb.URI.hostnameFromURI(targetURL), - requestType: 'popup' - }, result); + pageStore.logRequest(context, result); } // Not blocked