Index: lib/popupBlocker.js |
diff --git a/lib/popupBlocker.js b/lib/popupBlocker.js |
index 9d3594ec4bb800119cb8546b07cfa484c38751a8..49ecc1dac6f5f72c319a5118234c311ff6675e45 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"); |
@@ -100,7 +100,7 @@ chrome.webNavigation.onCreatedNavigationTarget.addListener(details => |
chrome.webRequest.onBeforeRequest.addListener( |
onPopupURLChanged, |
{ |
- urls: ["<all_urls>"], |
+ urls: ["<all_urls>"], |
types: ["main_frame"] |
} |
); |
@@ -109,7 +109,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}), |
@@ -118,9 +118,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; |