Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/stats.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Created Jan. 13, 2017, 12:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/stats.js
diff --git a/lib/stats.js b/lib/stats.js
index 81dfff3af0728c3ef5941002c01f055752cdccc3..ec79548ed75637935bbb77cd9a80d0ddb2d4921a 100644
--- a/lib/stats.js
+++ b/lib/stats.js
@@ -30,10 +30,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 +54,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)
« chrome/ext/common.js ('K') | « lib/requestBlocker.js ('k') | lib/subscriptionInit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld