Index: lib/stats.js |
diff --git a/lib/stats.js b/lib/stats.js |
index 81dfff3af0728c3ef5941002c01f055752cdccc3..a8ab3f1d87c6a240c7816a381dc3873661e9c904 100644 |
--- a/lib/stats.js |
+++ b/lib/stats.js |
@@ -17,6 +17,8 @@ |
/** @module stats */ |
+"use strict"; |
+ |
let {Prefs} = require("prefs"); |
let {BlockingFilter} = require("filterClasses"); |
let {FilterNotifier} = require("filterNotifier"); |
@@ -30,10 +32,7 @@ let blockedPerPage = new ext.PageMap(); |
* @param {Page} page |
* @return {Number} |
*/ |
-exports.getBlockedPerPage = function(page) |
-{ |
- return blockedPerPage.get(page) || 0; |
-}; |
+exports.getBlockedPerPage = page => blockedPerPage.get(page) || 0; |
FilterNotifier.on("filter.hitCount", (filter, newValue, oldValue, page) => |
{ |
@@ -57,11 +56,10 @@ FilterNotifier.on("filter.hitCount", (filter, newValue, oldValue, page) => |
Prefs.on("show_statsinicon", () => |
{ |
- ext.pages.query({}, function(pages) |
+ ext.pages.query({}, pages => |
{ |
- for (var i = 0; i < pages.length; i++) |
+ for (let page of pages) |
{ |
- let page = pages[i]; |
let badge = null; |
if (Prefs.show_statsinicon) |