Index: lib/popupBlocker.js |
diff --git a/lib/popupBlocker.js b/lib/popupBlocker.js |
index ebccf1cf19fdb0443469db3e4be4d123a80e6fe1..8d212e4f4b9b99ab8a873436d010b187d17483f2 100644 |
--- a/lib/popupBlocker.js |
+++ b/lib/popupBlocker.js |
@@ -24,7 +24,7 @@ const {BlockingFilter, |
RegExpFilter} = require("../adblockpluscore/lib/filterClasses"); |
const {isThirdParty, extractHostFromFrame} = require("./url"); |
const {checkWhitelisted} = require("./whitelisting"); |
-const {logRequest} = require("./devtools"); |
+const {logRequest} = require("./hitLogger"); |
let loadingPopups = new Map(); |
@@ -44,8 +44,8 @@ function forgetPopup(tabId) |
function checkPotentialPopup(tabId, popup) |
{ |
let url = popup.url || "about:blank"; |
- let documentHost = extractHostFromFrame(popup.sourceFrame); |
- let thirdParty = isThirdParty(new URL(url), documentHost); |
+ let docDomain = extractHostFromFrame(popup.sourceFrame); |
Manish Jethani
2018/05/09 15:11:11
Let's keep it documentHost here?
kzar
2018/05/09 17:58:42
Done.
|
+ let thirdParty = isThirdParty(new URL(url), docDomain); |
let specificOnly = !!checkWhitelisted( |
popup.sourcePage, popup.sourceFrame, null, |
@@ -54,16 +54,16 @@ function checkPotentialPopup(tabId, popup) |
let filter = defaultMatcher.matchesAny( |
url, RegExpFilter.typeMap.POPUP, |
- documentHost, thirdParty, null, specificOnly |
+ docDomain, thirdParty, null, specificOnly |
); |
if (filter instanceof BlockingFilter) |
browser.tabs.remove(tabId); |
logRequest( |
- [popup.sourcePage.id], url, "POPUP", |
- documentHost, thirdParty, null, |
- specificOnly, filter |
+ [popup.sourcePage.id], |
+ {url, type: "POPUP", docDomain, thirdParty, specificOnly}, |
+ filter |
); |
} |