Index: lib/popupBlocker.js |
=================================================================== |
--- a/lib/popupBlocker.js |
+++ b/lib/popupBlocker.js |
@@ -22,7 +22,7 @@ |
const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
const {BlockingFilter, |
RegExpFilter} = require("../adblockpluscore/lib/filterClasses"); |
-const {stringifyURL, isThirdParty, extractHostFromFrame} = require("./url"); |
+const {isThirdParty, extractHostFromFrame} = require("./url"); |
const {checkWhitelisted} = require("./whitelisting"); |
const {logRequest} = require("./devtools"); |
@@ -43,10 +43,9 @@ |
function checkPotentialPopup(tabId, popup) |
{ |
- let urlObj = new URL(popup.url || "about:blank"); |
- let urlString = stringifyURL(urlObj); |
+ let url = popup.url || "about:blank"; |
let documentHost = extractHostFromFrame(popup.sourceFrame); |
- let thirdParty = isThirdParty(urlObj, documentHost); |
+ let thirdParty = isThirdParty(new URL(url), documentHost); |
let specificOnly = !!checkWhitelisted( |
popup.sourcePage, popup.sourceFrame, null, |
@@ -54,7 +53,7 @@ |
); |
let filter = defaultMatcher.matchesAny( |
- urlString, RegExpFilter.typeMap.POPUP, |
+ url, RegExpFilter.typeMap.POPUP, |
documentHost, thirdParty, null, specificOnly |
); |
@@ -62,7 +61,7 @@ |
browser.tabs.remove(tabId); |
logRequest( |
- [popup.sourcePage.id], urlString, "POPUP", |
+ [popup.sourcePage.id], url, "POPUP", |
documentHost, thirdParty, null, |
specificOnly, filter |
); |