Index: background.js |
diff --git a/background.js b/background.js |
index 3e2eb08be89145c56ce79fe3ad3d676b8a4655dd..cfc9536c00e1c2d3a57673cbaecff059253279fc 100644 |
--- a/background.js |
+++ b/background.js |
@@ -30,13 +30,18 @@ port.on("get-selectors", function(msg, sender) |
if (!checkWhitelisted(sender.page, sender.frame, |
RegExpFilter.typeMap.DOCUMENT | |
RegExpFilter.typeMap.ELEMHIDE)) |
+ { |
+ var specificOnly = checkWhitelisted(sender.page, sender.frame, |
+ RegExpFilter.typeMap.GENERICHIDE); |
selectors = ElemHide.getSelectorsForDomain( |
extractHostFromFrame(sender.frame), |
- checkWhitelisted(sender.page, sender.frame, |
- RegExpFilter.typeMap.GENERICHIDE) |
+ specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.ALL_MATCHING |
); |
+ } |
else |
+ { |
selectors = []; |
+ } |
return {selectors: selectors, trace: trace}; |
}); |