Index: lib/requestBlocker.js |
=================================================================== |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -18,17 +18,17 @@ |
/** @module requestBlocker */ |
"use strict"; |
const {Filter, RegExpFilter, BlockingFilter} = |
require("../adblockpluscore/lib/filterClasses"); |
const {Subscription} = require("../adblockpluscore/lib/subscriptionClasses"); |
const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
-const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
+const {filterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
const {Prefs} = require("./prefs"); |
const {checkWhitelisted, getKey} = require("./whitelisting"); |
const {extractHostFromFrame, isThirdParty} = require("./url"); |
const {port} = require("./messaging"); |
const {logRequest: hitLoggerLogRequest} = require("./hitLogger"); |
const extensionProtocol = new URL(browser.extension.getURL("")).protocol; |
@@ -117,17 +117,17 @@ |
return Promise.resolve([]); |
return browser.tabs.query({url}).then(tabs => tabs.map(tab => tab.id)); |
} |
function logRequest(tabIds, request, filter) |
{ |
if (filter) |
- FilterNotifier.emit("filter.hitCount", filter, 0, 0, tabIds); |
+ filterNotifier.emit("filter.hitCount", filter, 0, 0, tabIds); |
hitLoggerLogRequest(tabIds, request, filter); |
} |
browser.webRequest.onBeforeRequest.addListener(details => |
{ |
// Never block top-level documents. |
if (details.type == "main_frame") |
@@ -318,20 +318,20 @@ |
// but it's an expensive operation and that way we avoid to call |
// it multiple times, if multiple filters are added/removed. |
if (!browser.webNavigation.onBeforeNavigate |
.hasListener(propagateHandlerBehaviorChange)) |
browser.webNavigation.onBeforeNavigate |
.addListener(propagateHandlerBehaviorChange); |
ignoreFilterNotifications = false; |
- FilterNotifier.emit("filter.behaviorChanged"); |
+ filterNotifier.emit("filter.behaviorChanged"); |
}); |
} |
-FilterNotifier.on("subscription.added", onFilterChange); |
-FilterNotifier.on("subscription.removed", onFilterChange); |
-FilterNotifier.on("subscription.updated", onFilterChange); |
-FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
-FilterNotifier.on("filter.added", onFilterChange); |
-FilterNotifier.on("filter.removed", onFilterChange); |
-FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
-FilterNotifier.on("load", onFilterChange); |
+filterNotifier.on("subscription.added", onFilterChange); |
+filterNotifier.on("subscription.removed", onFilterChange); |
+filterNotifier.on("subscription.updated", onFilterChange); |
+filterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
+filterNotifier.on("filter.added", onFilterChange); |
+filterNotifier.on("filter.removed", onFilterChange); |
+filterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
+filterNotifier.on("load", onFilterChange); |