Index: lib/stats.js |
=================================================================== |
--- a/lib/stats.js |
+++ b/lib/stats.js |
@@ -84,20 +84,26 @@ |
if (name != "show_statsinicon") |
return; |
- ext.pages.query({}, function(page) |
+ ext.pages.query({}, function(pages) |
{ |
- let badge = null; |
- if (Prefs.show_statsinicon) |
+ for (var i = 0; i < pages.length; i++) |
{ |
- let pageStats = statsPerPage.get(page); |
- if (pageStats && "blocked" in pageStats) |
+ let page = pages[i]; |
+ let badge = null; |
+ |
+ if (Prefs.show_statsinicon) |
{ |
- badge = { |
- color: badgeColor, |
- number: pageStats.blocked |
- }; |
+ let pageStats = statsPerPage.get(page); |
+ if (pageStats && "blocked" in pageStats) |
+ { |
+ badge = { |
+ color: badgeColor, |
+ number: pageStats.blocked |
+ }; |
+ } |
} |
+ |
+ page.browserAction.setBadge(badge); |
} |
- page.browserAction.setBadge(badge); |
}); |
}); |