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

Unified Diff: stats.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 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
===================================================================
--- a/stats.js
+++ b/stats.js
@@ -1,6 +1,6 @@
/*
* This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
+ * Copyright (C) 2006-2017 eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -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