Index: lib/whitelisting.js |
diff --git a/lib/whitelisting.js b/lib/whitelisting.js |
index da2f187d797906149caf29831a0187942a74525e..a1c3c77d70dc1c9cb866072bf7b5347c190f4025 100644 |
--- a/lib/whitelisting.js |
+++ b/lib/whitelisting.js |
@@ -21,7 +21,6 @@ |
const {defaultMatcher} = require("matcher"); |
const {RegExpFilter} = require("filterClasses"); |
-const {DownloadableSubscription} = require("subscriptionClasses"); |
const {FilterNotifier} = require("filterNotifier"); |
const {stringifyURL, getDecodedHostname, |
extractHostFromFrame, isThirdParty} = require("url"); |
@@ -44,9 +43,11 @@ function match(page, url, typeMask, docDomain, sitekey) |
); |
if (filter && devtools) |
+ { |
devtools.logWhitelistedDocument( |
page, urlString, typeMask, docDomain, filter |
); |
+ } |
return filter; |
} |
@@ -72,7 +73,7 @@ exports.checkWhitelisted = (page, frame, typeMask) => |
while (frame && !filter) |
{ |
- let parent = frame.parent; |
+ let {parent} = frame; |
let docDomain = extractHostFromFrame(parent); |
let sitekey = getKey(page, frame); |
@@ -186,7 +187,8 @@ function onHeadersReceived(details) |
// to happen until the onCommitted event fires. Unfortunately if we want |
// sitekey whitelisting to work for requests made before onCommitted has |
// been fired we must update the page structure now anyway. |
- ext._updatePageFrameStructure(details.frameId, details.tabId, details.url, true); |
+ ext._updatePageFrameStructure(details.frameId, details.tabId, |
+ details.url, true); |
recordKey(key, page, url); |
break; |
} |
@@ -195,6 +197,7 @@ function onHeadersReceived(details) |
} |
if (typeof chrome == "object") |
+{ |
chrome.webRequest.onHeadersReceived.addListener( |
onHeadersReceived, |
{ |
@@ -203,3 +206,4 @@ if (typeof chrome == "object") |
}, |
["responseHeaders"] |
); |
+} |