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: Rebased Created March 17, 2017, 12:41 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
« no previous file with comments | « qunit/tests/versionComparator.js ('k') | subscriptionLink.postload.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: stats.js
diff --git a/stats.js b/stats.js
index 39197c8a9a5796d3b5d25643c3801f1423fb1ddd..4d7ef6ba422430a434d4a41b4bb28c65e13ca2e4 100644
--- a/stats.js
+++ b/stats.js
@@ -15,8 +15,11 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+/* global i18n */
+
"use strict";
+(function()
{
const {require} = ext.backgroundPage.getWindow();
@@ -63,18 +66,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,9 +127,11 @@
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);
window.addEventListener("unload", onUnload, false);
-}
+}());
« no previous file with comments | « qunit/tests/versionComparator.js ('k') | subscriptionLink.postload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld