| Index: lib/elemHide.js |
| =================================================================== |
| --- a/lib/elemHide.js |
| +++ b/lib/elemHide.js |
| @@ -16,17 +16,17 @@ |
| */ |
| "use strict"; |
| /** |
| * @fileOverview Element hiding implementation. |
| */ |
| -const {ElemHideException} = require("filterClasses"); |
| +const {ElemHideExceptionBase} = require("filterClasses"); |
| const {FilterNotifier} = require("filterNotifier"); |
| /** |
| * Lookup table, filters by their associated key |
| * @type {Object} |
| */ |
| let filterByKey = []; |
| @@ -118,17 +118,17 @@ |
| }, |
| /** |
| * Add a new element hiding filter |
| * @param {ElemHideFilter} filter |
| */ |
| add(filter) |
| { |
| - if (filter instanceof ElemHideException) |
| + if (filter instanceof ElemHideExceptionBase) |
| { |
| if (filter.text in knownExceptions) |
| return; |
| let {selector} = filter; |
| if (!(selector in exceptions)) |
| exceptions[selector] = []; |
| exceptions[selector].push(filter); |
| @@ -191,17 +191,17 @@ |
| }, |
| /** |
| * Removes an element hiding filter |
| * @param {ElemHideFilter} filter |
| */ |
| remove(filter) |
| { |
| - if (filter instanceof ElemHideException) |
| + if (filter instanceof ElemHideExceptionBase) |
| { |
| if (!(filter.text in knownExceptions)) |
| return; |
| let list = exceptions[filter.selector]; |
| let index = list.indexOf(filter); |
| if (index >= 0) |
| list.splice(index, 1); |
| @@ -221,17 +221,17 @@ |
| FilterNotifier.emit("elemhideupdate"); |
| }, |
| /** |
| * Checks whether an exception rule is registered for a filter on a particular |
| * domain. |
| * @param {Filter} filter |
| * @param {string} docDomain |
| - * @return {ElemHideException} |
| + * @return {ElemHideExceptionBase} |
| */ |
| getException(filter, docDomain) |
| { |
| if (!(filter.selector in exceptions)) |
| return null; |
| let list = exceptions[filter.selector]; |
| for (let i = list.length - 1; i >= 0; i--) |