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: Reduce inline eslint-disable comments Created Feb. 8, 2017, 7:27 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 da2f187d797906149caf29831a0187942a74525e..dfad39e44cb318e223c084bb8e4365076d19dcad 100644
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -44,9 +44,11 @@ function match(page, url, typeMask, docDomain, sitekey)
);
if (filter && devtools)
+ {
devtools.logWhitelistedDocument(
page, urlString, typeMask, docDomain, filter
);
+ }
return filter;
}
@@ -72,7 +74,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 +188,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 +198,7 @@ function onHeadersReceived(details)
}
if (typeof chrome == "object")
+{
chrome.webRequest.onHeadersReceived.addListener(
onHeadersReceived,
{
@@ -203,3 +207,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