Index: lib/whitelisting.js |
=================================================================== |
--- a/lib/whitelisting.js |
+++ b/lib/whitelisting.js |
@@ -91,20 +91,19 @@ |
function revalidateWhitelistingState(page) |
{ |
- FilterNotifier.triggerListeners( |
+ FilterNotifier.emit( |
"page.WhitelistingStateRevalidate", |
page, checkWhitelisted(page) |
); |
} |
-FilterNotifier.addListener(action => |
+FilterNotifier.on("filter.behaviorChanged", () => |
{ |
- if (action == "filter.behaviorChanged") |
- ext.pages.query({}, pages => |
- { |
- for (let page of pages) |
- revalidateWhitelistingState(page); |
- }); |
+ ext.pages.query({}, pages => |
+ { |
+ for (let page of pages) |
+ revalidateWhitelistingState(page); |
+ }); |
}); |
ext.pages.onLoading.addListener(revalidateWhitelistingState); |