| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 function share(ev) | 126 function share(ev) |
| 127 { | 127 { |
| 128 getPref("blocked_total", blockedTotal => | 128 getPref("blocked_total", blockedTotal => |
| 129 { | 129 { |
| 130 // Easter Egg | 130 // Easter Egg |
| 131 if (blockedTotal <= 9000 || blockedTotal >= 10000) | 131 if (blockedTotal <= 9000 || blockedTotal >= 10000) |
| 132 blockedTotal = blockedTotal.toLocaleString(); | 132 blockedTotal = blockedTotal.toLocaleString(); |
| 133 else | 133 else |
| 134 blockedTotal = i18n.getMessage("stats_over", (9000).toLocaleString()); | 134 blockedTotal = i18n.getMessage("stats_over", (9000).toLocaleString()); |
| 135 | 135 |
| 136 ext.pages.open(createShareLink(ev.target.dataset.social, blockedTotal)); | 136 chrome.tabs.create({ |
| 137 url: createShareLink(ev.target.dataset.social, blockedTotal) |
| 138 }); |
| 137 }); | 139 }); |
| 138 } | 140 } |
| 139 | 141 |
| 140 function toggleIconNumber() | 142 function toggleIconNumber() |
| 141 { | 143 { |
| 142 togglePref("show_statsinicon", showStatsInIcon => | 144 togglePref("show_statsinicon", showStatsInIcon => |
| 143 { | 145 { |
| 144 document.getElementById("show-iconnumber").setAttribute( | 146 document.getElementById("show-iconnumber").setAttribute( |
| 145 "aria-checked", showStatsInIcon | 147 "aria-checked", showStatsInIcon |
| 146 ); | 148 ); |
| 147 }); | 149 }); |
| 148 } | 150 } |
| 149 | 151 |
| 150 document.addEventListener("DOMContentLoaded", onLoad, false); | 152 document.addEventListener("DOMContentLoaded", onLoad, false); |
| 151 window.addEventListener("unload", onUnload, false); | 153 window.addEventListener("unload", onUnload, false); |
| 152 }()); | 154 }()); |
| OLD | NEW |