Index: lib/stats.js |
=================================================================== |
--- a/lib/stats.js |
+++ b/lib/stats.js |
@@ -35,12 +35,9 @@ |
return blockedPerPage.get(page) || 0; |
}; |
-FilterNotifier.addListener(function(action, item, newValue, oldValue, page) |
+FilterNotifier.on("filter.hitCount", (filter, newValue, oldValue, page) => |
{ |
- if (action != "filter.hitCount" || !page) |
- return; |
- |
- if (!(item instanceof BlockingFilter)) |
+ if (!(filter instanceof BlockingFilter) || !page) |
return; |
Prefs.blocked_total++; |
@@ -58,7 +55,7 @@ |
} |
}); |
-Prefs.on("show_statsinicon", function() |
+Prefs.on("show_statsinicon", () => |
{ |
ext.pages.query({}, function(pages) |
{ |