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

Delta Between Two Patch Sets: updates.js

Issue 29592569: Issue 5943 - Implement Updates Page for Adblock Plus extension (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Left Patch Set: Addressed fourth round of feedback Created Nov. 26, 2017, 5:06 p.m.
Right Patch Set: Addressed seventh round of feedback Created Jan. 12, 2018, 11:35 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « updates.html ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 setLinks, E */ 18 /* globals getDocLink, 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 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 optionsPageLinkParent = E("options-page-news"); 26 let optionsPageLink = document.querySelector("#options-page-news > a");
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", () => 27 optionsPageLink.addEventListener("click", () =>
29 { 28 {
30 browser.runtime.sendMessage( 29 browser.runtime.sendMessage(
31 { 30 {
32 type: "app.open", 31 type: "app.open",
33 what: "options" 32 what: "options"
34 } 33 }
35 ); 34 );
36 }); 35 });
36 getDocLink("adblock_browser_ios_store", (url) =>
37 {
38 E("adblock-browser-ios-store").href = url;
39 });
40 getDocLink("adblock_browser_android_store", (url) =>
41 {
42 E("adblock-browser-android-store").href = url;
43 });
44 getDocLink("adblock_browser_website", (url) =>
45 {
46 setLinks("adblock-browser-text", url);
47 });
37 } 48 }
38 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 49 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
39 }()); 50 }());
LEFTRIGHT
« updates.html ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld