Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -20,6 +20,7 @@ |
this.Filter = Filter; |
this.BlockingFilter = BlockingFilter; |
this.WhitelistFilter = WhitelistFilter; |
+ this.ElemHideFilter = ElemHideFilter; |
} |
with(require("subscriptionClasses")) |
{ |
@@ -534,10 +535,17 @@ |
break; |
} |
+ var selectors = []; |
for (var i = 0; i < filters.length; i++) |
- FilterStorage.addFilter(filters[i]); |
+ { |
+ var filter = filters[i]; |
+ FilterStorage.addFilter(filter); |
- sendResponse({status: "ok"}); |
+ if (filter instanceof ElemHideFilter) |
+ selectors.push(filter.selector); |
+ } |
+ |
+ sendResponse({status: "ok", selectors: selectors}); |
break; |
case "add-subscription": |
ext.showOptions(function(page) |