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

Unified Diff: lib/elemHide.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 | « no previous file | lib/elemHideExceptions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | lib/elemHideExceptions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld