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 two globals from tests Created March 31, 2017, 7:48 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
« 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 7588078f272d765f11b0cf57ec15656fc61a61c8..88a472d3deacc2f70f220fb3ee42de6d4d30cd74 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