| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | |
| 3 * Copyright (C) 2006-present eyeo GmbH | |
| 4 * | |
| 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 | |
| 7 * published by the Free Software Foundation. | |
| 8 * | |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 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/>. | |
| 16 */ | |
| 17 | |
| 18 /* globals setLinks, E */ | |
|
Thomas Greiner
2017/11/27 16:15:50
Detail: You're not using `setLinks()` in this file
martin
2017/12/05 14:37:32
I'm now using it to set the link for id="adblock-b
| |
| 19 | |
| 20 "use strict"; | |
| 21 | |
| 22 (function() | |
| 23 { | |
| 24 function onDOMLoaded() | |
| 25 { | |
| 26 const optionsPageLinkParent = E("options-page-news"); | |
| 27 const optionsPageLink = optionsPageLinkParent.getElementsByTagName("a")[0]; | |
|
Thomas Greiner
2017/11/27 16:15:51
Detail: Using `document.querySelector()` you can d
martin
2017/12/05 14:37:31
Fixed.
| |
| 28 optionsPageLink.addEventListener("click", () => | |
| 29 { | |
| 30 browser.runtime.sendMessage( | |
| 31 { | |
| 32 type: "app.open", | |
| 33 what: "options" | |
| 34 } | |
| 35 ); | |
| 36 }); | |
| 37 } | |
| 38 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); | |
| 39 }()); | |
| OLD | NEW |