Skip to content

Instantly share code, notes, and snippets.

@kzar
Last active November 6, 2015 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kzar/b7c6d83eac0be774bb7c to your computer and use it in GitHub Desktop.
Save kzar/b7c6d83eac0be774bb7c to your computer and use it in GitHub Desktop.
cssRules changes
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