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

Unified Diff: lib/filterListener.js

Issue 29868577: Issue 6891 - Rename FilterNotifier to filterNotifier (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 29, 2018, 2 p.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/filterClasses.js ('k') | lib/filterNotifier.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -21,17 +21,17 @@
* @fileOverview Component synchronizing filter storage with Matcher
* instances and ElemHide.
*/
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
const {XPCOMUtils} = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
const {FilterStorage} = require("./filterStorage");
-const {FilterNotifier} = require("./filterNotifier");
+const {filterNotifier} = require("./filterNotifier");
const {ElemHide} = require("./elemHide");
const {ElemHideEmulation} = require("./elemHideEmulation");
const {ElemHideExceptions} = require("./elemHideExceptions");
const {Snippets} = require("./snippets");
const {defaultMatcher} = require("./matcher");
const {ActiveFilter, RegExpFilter,
ElemHideBase, ElemHideFilter, ElemHideEmulationFilter,
SnippetFilter} = require("./filterClasses");
@@ -92,37 +92,37 @@
)
};
/**
* Initializes filter listener on startup, registers the necessary hooks.
*/
function init()
{
- FilterNotifier.on("filter.hitCount", onFilterHitCount);
- FilterNotifier.on("filter.lastHit", onFilterLastHit);
- FilterNotifier.on("filter.added", onFilterAdded);
- FilterNotifier.on("filter.removed", onFilterRemoved);
- FilterNotifier.on("filter.disabled", onFilterDisabled);
- FilterNotifier.on("filter.moved", onGenericChange);
+ filterNotifier.on("filter.hitCount", onFilterHitCount);
+ filterNotifier.on("filter.lastHit", onFilterLastHit);
+ filterNotifier.on("filter.added", onFilterAdded);
+ filterNotifier.on("filter.removed", onFilterRemoved);
+ filterNotifier.on("filter.disabled", onFilterDisabled);
+ filterNotifier.on("filter.moved", onGenericChange);
- FilterNotifier.on("subscription.added", onSubscriptionAdded);
- FilterNotifier.on("subscription.removed", onSubscriptionRemoved);
- FilterNotifier.on("subscription.disabled", onSubscriptionDisabled);
- FilterNotifier.on("subscription.updated", onSubscriptionUpdated);
- FilterNotifier.on("subscription.moved", onGenericChange);
- FilterNotifier.on("subscription.title", onGenericChange);
- FilterNotifier.on("subscription.fixedTitle", onGenericChange);
- FilterNotifier.on("subscription.homepage", onGenericChange);
- FilterNotifier.on("subscription.downloadStatus", onGenericChange);
- FilterNotifier.on("subscription.lastCheck", onGenericChange);
- FilterNotifier.on("subscription.errors", onGenericChange);
+ filterNotifier.on("subscription.added", onSubscriptionAdded);
+ filterNotifier.on("subscription.removed", onSubscriptionRemoved);
+ filterNotifier.on("subscription.disabled", onSubscriptionDisabled);
+ filterNotifier.on("subscription.updated", onSubscriptionUpdated);
+ filterNotifier.on("subscription.moved", onGenericChange);
+ filterNotifier.on("subscription.title", onGenericChange);
+ filterNotifier.on("subscription.fixedTitle", onGenericChange);
+ filterNotifier.on("subscription.homepage", onGenericChange);
+ filterNotifier.on("subscription.downloadStatus", onGenericChange);
+ filterNotifier.on("subscription.lastCheck", onGenericChange);
+ filterNotifier.on("subscription.errors", onGenericChange);
- FilterNotifier.on("load", onLoad);
- FilterNotifier.on("save", onSave);
+ filterNotifier.on("load", onLoad);
+ filterNotifier.on("save", onSave);
FilterStorage.loadFromDisk();
Services.obs.addObserver(HistoryPurgeObserver,
"browser:purge-session-history", true);
onShutdown.add(() =>
{
Services.obs.removeObserver(HistoryPurgeObserver,
« no previous file with comments | « lib/filterClasses.js ('k') | lib/filterNotifier.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld