-
-
Save kzar/b7c6d83eac0be774bb7c to your computer and use it in GitHub Desktop.
cssRules changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/cssRules.js b/lib/cssRules.js | |
index d172108..ba61c4f 100644 | |
--- a/lib/cssRules.js | |
+++ b/lib/cssRules.js | |
@@ -19,7 +19,7 @@ | |
* @fileOverview CSS property filtering implementation. | |
*/ | |
-let {ElemHide: {getException}} = require("elemHide"); | |
+let {ElemHide} = require("elemHide"); | |
/** | |
* Lookup table, filters by their associated key | |
@@ -83,20 +83,17 @@ let CSSRules = exports.CSSRules = | |
/** | |
* Returns a list of all rules active on a particular domain | |
* @param {String} domain | |
- * @param {Boolean} specificOnly | |
*/ | |
- getRulesForDomain: function(domain, specificOnly) | |
+ getRulesForDomain: function(domain) | |
{ | |
let result = []; | |
let keys = Object.getOwnPropertyNames(filterByKey); | |
for (let key of keys) | |
{ | |
let filter = filterByKey[key]; | |
- if (specificOnly && (!filter.domains || filter.domains[""])) | |
- continue; | |
- if (filter.isActiveOnDomain(domain) && !getException(filter, domain)) | |
- result.push(filter.selector); | |
+ if (filter.isActiveOnDomain(domain) && !ElemHide.getException(filter, domain)) | |
+ result.push(filter); | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment