Index: lib/elemHide.js |
=================================================================== |
--- a/lib/elemHide.js |
+++ b/lib/elemHide.js |
@@ -17,17 +17,17 @@ |
"use strict"; |
/** |
* @fileOverview Element hiding implementation. |
*/ |
const {ElemHideExceptions} = require("./elemHideExceptions"); |
-const {FilterNotifier} = require("./filterNotifier"); |
+const {filterNotifier} = require("./filterNotifier"); |
/** |
* Lookup table, active flag, by filter by domain. |
* (Only contains filters that aren't unconditionally matched for all domains.) |
* @type {Map.<string,Map.<Filter,boolean>>} |
*/ |
let filtersByDomain = new Map(); |
@@ -113,17 +113,17 @@ |
* Removes all known filters |
*/ |
clear() |
{ |
for (let collection of [filtersByDomain, filterBySelector, knownFilters]) |
collection.clear(); |
unconditionalSelectors = null; |
- FilterNotifier.emit("elemhideupdate"); |
+ filterNotifier.emit("elemhideupdate"); |
}, |
/** |
* Add a new element hiding filter |
* @param {ElemHideFilter} filter |
*/ |
add(filter) |
{ |
@@ -140,17 +140,17 @@ |
} |
else |
{ |
// The new filter's selector only applies to some domains |
addToFiltersByDomain(filter); |
} |
knownFilters.add(filter); |
- FilterNotifier.emit("elemhideupdate"); |
+ filterNotifier.emit("elemhideupdate"); |
}, |
/** |
* Removes an element hiding filter |
* @param {ElemHideFilter} filter |
*/ |
remove(filter) |
{ |
@@ -178,17 +178,17 @@ |
if (filters.size == 0) |
filtersByDomain.delete(domain); |
} |
} |
} |
knownFilters.delete(filter); |
- FilterNotifier.emit("elemhideupdate"); |
+ filterNotifier.emit("elemhideupdate"); |
}, |
/** |
* Determines from the current filter list which selectors should be applied |
* on a particular host name. |
* @param {string} domain |
* @param {boolean} [specificOnly] true if generic filters should not apply. |
* @returns {string[]} List of selectors. |