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

Unified Diff: lib/popupBlocker.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Tidy up hasRecord and some notification logic Created March 31, 2017, 3:36 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
Index: lib/popupBlocker.js
diff --git a/lib/popupBlocker.js b/lib/popupBlocker.js
index 9d3594ec4bb800119cb8546b07cfa484c38751a8..a7eb1cb8a5376875233fe86c40cceba82910caa5 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}),

Powered by Google App Engine
This is Rietveld