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); |
-} |
+}()); |