Index: lib/popupBlocker.js |
diff --git a/lib/popupBlocker.js b/lib/popupBlocker.js |
index 3c171f0aff419a2cdf35c1632e49805d6c2c902a..cc7bbff277f7ad44ca32425e99d57199c1a0deb0 100644 |
--- a/lib/popupBlocker.js |
+++ b/lib/popupBlocker.js |
@@ -20,7 +20,7 @@ |
"use strict"; |
const {defaultMatcher} = require("matcher"); |
-const {BlockingFilter} = require("filterClasses"); |
+const {BlockingFilter, RegExpFilter} = require("filterClasses"); |
const {stringifyURL, isThirdParty, extractHostFromFrame} = require("url"); |
const {checkWhitelisted} = require("whitelisting"); |
const {logRequest} = require("devtools"); |
@@ -95,7 +95,7 @@ chrome.webNavigation.onCreatedNavigationTarget.addListener(details => |
chrome.webRequest.onBeforeRequest.addListener( |
onBeforeRequest, |
{ |
- urls: ["<all_urls>"], |
+ urls: ["<all_urls>"], |
types: ["main_frame"] |
} |
); |
@@ -104,7 +104,7 @@ chrome.webNavigation.onCreatedNavigationTarget.addListener(details => |
chrome.tabs.onRemoved.addListener(forgetPopup); |
} |
- let tabId = details.tabId; |
+ let {tabId} = details; |
let popup = loadingPopups[tabId] = { |
url: details.url, |
sourcePage: new ext.Page({id: details.sourceTabId}), |
@@ -113,9 +113,7 @@ chrome.webNavigation.onCreatedNavigationTarget.addListener(details => |
let frame = ext.getFrame(details.sourceTabId, details.sourceFrameId); |
if (checkWhitelisted(popup.sourcePage, frame)) |
- { |
forgetPopup(tabId); |
- } |
else |
{ |
popup.sourceFrame = frame; |