Index: lib/popupBlocker.js |
=================================================================== |
--- a/lib/popupBlocker.js |
+++ b/lib/popupBlocker.js |
@@ -17,17 +17,16 @@ |
/** @module popupBlocker */ |
"use strict"; |
const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
const {BlockingFilter, |
RegExpFilter} = require("../adblockpluscore/lib/filterClasses"); |
-const {isThirdParty} = require("../adblockpluscore/lib/domain"); |
const {extractHostFromFrame} = require("./url"); |
const {checkWhitelisted} = require("./whitelisting"); |
const {logRequest} = require("./hitLogger"); |
let loadingPopups = new Map(); |
function forgetPopup(tabId) |
{ |
@@ -41,34 +40,33 @@ |
browser.tabs.onRemoved.removeListener(forgetPopup); |
} |
} |
function checkPotentialPopup(tabId, popup) |
{ |
let url = popup.url || "about:blank"; |
let documentHost = extractHostFromFrame(popup.sourceFrame); |
- let thirdParty = isThirdParty(new URL(url), documentHost); |
let specificOnly = !!checkWhitelisted( |
popup.sourcePage, popup.sourceFrame, null, |
RegExpFilter.typeMap.GENERICBLOCK |
); |
let filter = defaultMatcher.matchesAny( |
url, RegExpFilter.typeMap.POPUP, |
- documentHost, thirdParty, null, specificOnly |
+ documentHost, null, specificOnly |
); |
if (filter instanceof BlockingFilter) |
browser.tabs.remove(tabId); |
logRequest( |
[popup.sourcePage.id], |
- {url, type: "POPUP", docDomain: documentHost, thirdParty, specificOnly}, |
+ {url, type: "POPUP", docDomain: documentHost, specificOnly}, |
filter |
); |
} |
function onPopupURLChanged(details) |
{ |
// Ignore frames inside the popup window. |
if (details.frameId != 0) |