Index: lib/elemHideEmulation.js |
=================================================================== |
--- a/lib/elemHideEmulation.js |
+++ b/lib/elemHideEmulation.js |
@@ -16,17 +16,16 @@ |
*/ |
"use strict"; |
/** |
* @fileOverview Element hiding emulation implementation. |
*/ |
-const {ElemHide} = require("elemHide"); |
const {Filter} = require("filterClasses"); |
let filters = Object.create(null); |
/** |
* Container for element hiding emulation filters |
* @class |
*/ |
@@ -55,27 +54,28 @@ |
remove(filter) |
{ |
delete filters[filter.text]; |
}, |
/** |
* Returns a list of all rules active on a particular domain |
* @param {string} domain |
+ * @param {Object} elemHide the ElemHide instance |
* @return {ElemHideEmulationFilter[]} |
*/ |
- getRulesForDomain(domain) |
+ getRulesForDomain(domain, elemHide) |
{ |
let result = []; |
let keys = Object.getOwnPropertyNames(filters); |
for (let key of keys) |
{ |
let filter = Filter.fromText(key); |
if (filter.isActiveOnDomain(domain) && |
- !ElemHide.getException(filter, domain)) |
+ !elemHide.getException(filter, domain)) |
{ |
result.push(filter); |
} |
} |
return result; |
} |
}; |
exports.ElemHideEmulation = ElemHideEmulation; |