| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 /* globals getDocLink, setLinks, E */ | 18 /* globals getDocLink, setLinks, E */ |
| 19 | 19 |
| 20 "use strict"; | 20 "use strict"; |
| 21 | 21 |
| 22 (function() | 22 (function() |
| 23 { | 23 { |
| 24 function onDOMLoaded() | 24 function onDOMLoaded() |
| 25 { | 25 { |
| 26 const optionsPageLink = document.querySelector("#options-page-news > a"); | 26 let optionsPageLink = document.querySelector("#options-page-news > a"); |
|
Thomas Greiner
2018/01/10 12:28:21
Coding style: "Use const for constant expressions
martin
2018/01/12 11:15:42
Done.
| |
| 27 optionsPageLink.addEventListener("click", () => | 27 optionsPageLink.addEventListener("click", () => |
| 28 { | 28 { |
| 29 browser.runtime.sendMessage( | 29 browser.runtime.sendMessage( |
| 30 { | 30 { |
| 31 type: "app.open", | 31 type: "app.open", |
| 32 what: "options" | 32 what: "options" |
| 33 } | 33 } |
| 34 ); | 34 ); |
| 35 }); | 35 }); |
| 36 getDocLink("adblock_browser_ios_store", (url) => | 36 getDocLink("adblock_browser_ios_store", (url) => |
| 37 { | 37 { |
| 38 E("adblock_browser_ios_store").href = url; | 38 E("adblock-browser-ios-store").href = url; |
| 39 }); | 39 }); |
| 40 getDocLink("adblock_browser_android_store", (url) => | 40 getDocLink("adblock_browser_android_store", (url) => |
| 41 { | 41 { |
| 42 E("adblock_browser_android_store").href = url; | 42 E("adblock-browser-android-store").href = url; |
| 43 }); | 43 }); |
| 44 setLinks("adblock-browser-text", "https://adblockbrowser.org"); | 44 getDocLink("adblock_browser_website", (url) => |
|
Thomas Greiner
2017/12/11 12:11:10
The second argument is expected to be an array.
S
Thomas Greiner
2017/12/11 12:11:11
Again, let's not hardcode any links in the extensi
martin
2017/12/14 11:25:16
Couldn't find a doc-link to "https://adblockbrowse
Thomas Greiner
2017/12/14 13:36:26
The usual process is to update the spec and then i
martin
2017/12/19 12:59:52
I `getDocLink`-ed this. It's currently not working
Thomas Greiner
2018/01/10 12:28:22
Great, thanks.
| |
| 45 { | |
| 46 setLinks("adblock-browser-text", url); | |
| 47 }); | |
| 45 } | 48 } |
| 46 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 49 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
| 47 }()); | 50 }()); |
| LEFT | RIGHT |