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

Unified Diff: lib/elemHideExceptions.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/elemHide.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHideExceptions.js
===================================================================
--- a/lib/elemHideExceptions.js
+++ b/lib/elemHideExceptions.js
@@ -17,17 +17,17 @@
"use strict";
/**
* @fileOverview Element hiding exceptions implementation.
*/
const {EventEmitter} = require("./events");
-const {FilterNotifier} = require("./filterNotifier");
+const {filterNotifier} = require("./filterNotifier");
/**
* Lookup table, lists of element hiding exceptions by selector
* @type {Map.<string,ElemHideException[]>}
*/
let exceptions = new Map();
/**
@@ -44,17 +44,17 @@
/**
* Removes all known exceptions
*/
clear()
{
exceptions.clear();
knownExceptions.clear();
- FilterNotifier.emit("elemhideupdate");
+ filterNotifier.emit("elemhideupdate");
},
/**
* Add a new element hiding exception
* @param {ElemHideException} exception
*/
add(exception)
{
@@ -67,17 +67,17 @@
list.push(exception);
else
exceptions.set(selector, [exception]);
knownExceptions.add(exception);
this.emit("added", exception);
- FilterNotifier.emit("elemhideupdate");
+ filterNotifier.emit("elemhideupdate");
},
/**
* Removes an element hiding exception
* @param {ElemHideException} exception
*/
remove(exception)
{
@@ -88,17 +88,17 @@
let index = list.indexOf(exception);
if (index >= 0)
list.splice(index, 1);
knownExceptions.delete(exception);
this.emit("removed", exception);
- FilterNotifier.emit("elemhideupdate");
+ filterNotifier.emit("elemhideupdate");
},
/**
* Checks whether any exception rules are registered for a selector
* @param {string} selector
* @returns {boolean}
*/
hasExceptions(selector)
« no previous file with comments | « lib/elemHide.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld