Index: lib/devtools.js |
=================================================================== |
--- a/lib/devtools.js |
+++ b/lib/devtools.js |
@@ -19,17 +19,17 @@ |
const {RegExpFilter, |
WhitelistFilter, |
ElemHideFilter} = require("../adblockpluscore/lib/filterClasses"); |
const {SpecialSubscription} = |
require("../adblockpluscore/lib/subscriptionClasses"); |
const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
const {defaultMatcher} = require("../adblockpluscore/lib/matcher"); |
-const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
+const {filterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
const {extractHostFromFrame} = require("./url"); |
const {port} = require("./messaging"); |
const {HitLogger, nonRequestTypes} = require("./hitLogger"); |
let panels = new Map(); |
function isActivePanel(panel) |
{ |
@@ -47,17 +47,17 @@ |
function getFilterInfo(filter) |
{ |
if (!filter) |
return null; |
let userDefined = false; |
let subscriptionTitle = null; |
- for (let subscription of filter.subscriptions) |
+ for (let subscription of filter.subscriptions()) |
{ |
if (!subscription.disabled) |
{ |
if (subscription instanceof SpecialSubscription) |
userDefined = true; |
else |
subscriptionTitle = subscription.title; |
} |
@@ -249,31 +249,31 @@ |
types: ["main_frame"], |
tabId: inspectedTabId |
} |
); |
if (panels.size == 0) |
{ |
ext.pages.onLoading.addListener(onLoading); |
- FilterNotifier.on("filter.added", onFilterAdded); |
- FilterNotifier.on("filter.removed", onFilterRemoved); |
- FilterNotifier.on("subscription.added", onSubscriptionAdded); |
+ filterNotifier.on("filter.added", onFilterAdded); |
+ filterNotifier.on("filter.removed", onFilterRemoved); |
+ filterNotifier.on("subscription.added", onSubscriptionAdded); |
} |
newPort.onDisconnect.addListener(() => |
{ |
HitLogger.removeListener(inspectedTabId, hitListener); |
panels.delete(inspectedTabId); |
browser.webRequest.onBeforeRequest.removeListener(localOnBeforeRequest); |
if (panels.size == 0) |
{ |
ext.pages.onLoading.removeListener(onLoading); |
- FilterNotifier.off("filter.added", onFilterAdded); |
- FilterNotifier.off("filter.removed", onFilterRemoved); |
- FilterNotifier.off("subscription.added", onSubscriptionAdded); |
+ filterNotifier.off("filter.added", onFilterAdded); |
+ filterNotifier.off("filter.removed", onFilterRemoved); |
+ filterNotifier.off("subscription.added", onSubscriptionAdded); |
} |
}); |
HitLogger.addListener(inspectedTabId, hitListener); |
panels.set(inspectedTabId, panel); |
}); |