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

Unified Diff: stats.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Remove the arrow-parens rule Created March 9, 2017, 10:15 a.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: stats.js
diff --git a/stats.js b/stats.js
index 39197c8a9a5796d3b5d25643c3801f1423fb1ddd..76bd80a33516c8d94e3a38b0890bbfd04ae060c1 100644
--- a/stats.js
+++ b/stats.js
@@ -15,6 +15,8 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+/* global i18n */
+
"use strict";
{
@@ -63,18 +65,23 @@
let value = params[key];
if (value == messageMark)
value = i18n.getMessage("stats_share_message", blockedCount);
- querystring.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
+ querystring.push(
+ encodeURIComponent(key) + "=" + encodeURIComponent(value)
+ );
}
return url + "?" + querystring.join("&");
}
function onLoad()
{
- document.getElementById("share-box").addEventListener("click", share, false);
+ document.getElementById("share-box").addEventListener("click", share,
+ false);
let showIconNumber = document.getElementById("show-iconnumber");
showIconNumber.setAttribute("aria-checked", Prefs.show_statsinicon);
showIconNumber.addEventListener("click", toggleIconNumber, false);
- document.querySelector("label[for='show-iconnumber']").addEventListener("click", toggleIconNumber, false);
+ document.querySelector("label[for='show-iconnumber']").addEventListener(
+ "click", toggleIconNumber, false
+ );
// Update stats
ext.pages.query({active: true, lastFocusedWindow: true}, pages =>
@@ -119,7 +126,9 @@
function toggleIconNumber()
{
Prefs.show_statsinicon = !Prefs.show_statsinicon;
- document.getElementById("show-iconnumber").setAttribute("aria-checked", Prefs.show_statsinicon);
+ document.getElementById("show-iconnumber").setAttribute(
+ "aria-checked", Prefs.show_statsinicon
+ );
}
document.addEventListener("DOMContentLoaded", onLoad, false);

Powered by Google App Engine
This is Rietveld