Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/whitelisting.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Use .includes again Created March 31, 2017, 8:37 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/utils.js ('k') | notification.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
diff --git a/lib/whitelisting.js b/lib/whitelisting.js
index c3ecb1bd311e330053acb35d8dd7ddfb80a5ab0e..7a592b8da267a6040c9aa0879ddc5cacaf239a88 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);
@@ -190,6 +191,7 @@ function onHeadersReceived(details)
}
if (typeof chrome == "object")
+{
chrome.webRequest.onHeadersReceived.addListener(
onHeadersReceived,
{
@@ -198,3 +200,4 @@ if (typeof chrome == "object")
},
["responseHeaders"]
);
+}
« no previous file with comments | « lib/utils.js ('k') | notification.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld