Index: lib/popupBlocker.js |
diff --git a/lib/popupBlocker.js b/lib/popupBlocker.js |
index 244c38bb3397ff25fe9440ef7a1aeffb76f9c777..ab8c1f63b5b639335350c4425dcb70fae7d33108 100644 |
--- a/lib/popupBlocker.js |
+++ b/lib/popupBlocker.js |
@@ -24,7 +24,7 @@ const {BlockingFilter, |
RegExpFilter} = require("../adblockpluscore/lib/filterClasses"); |
const {stringifyURL, isThirdParty, extractHostFromFrame} = require("./url"); |
const {checkWhitelisted} = require("./whitelisting"); |
-const {logRequest} = require("./devtools"); |
+const {logRequest} = require("./hitLogger"); |
let loadingPopups = new Map(); |
@@ -45,8 +45,8 @@ function checkPotentialPopup(tabId, popup) |
{ |
let urlObj = new URL(popup.url || "about:blank"); |
let urlString = stringifyURL(urlObj); |
- let documentHost = extractHostFromFrame(popup.sourceFrame); |
- let thirdParty = isThirdParty(urlObj, documentHost); |
+ let docDomain = extractHostFromFrame(popup.sourceFrame); |
+ let thirdParty = isThirdParty(urlObj, docDomain); |
let specificOnly = !!checkWhitelisted( |
popup.sourcePage, popup.sourceFrame, null, |
@@ -55,16 +55,16 @@ function checkPotentialPopup(tabId, popup) |
let filter = defaultMatcher.matchesAny( |
urlString, RegExpFilter.typeMap.POPUP, |
- documentHost, thirdParty, null, specificOnly |
+ docDomain, thirdParty, null, specificOnly |
); |
if (filter instanceof BlockingFilter) |
browser.tabs.remove(tabId); |
logRequest( |
- [popup.sourcePage.id], urlString, "POPUP", |
- documentHost, thirdParty, null, |
- specificOnly, filter |
+ [popup.sourcePage.id], |
+ {url: urlString, type: "POPUP", docDomain, thirdParty, specificOnly}, |
+ filter |
); |
} |