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

Side by Side Diff: firstRun.js

Issue 29445590: Issue 5255 - Advanced tab (HTML, strings and functionality) (Closed)
Patch Set: Fixed nits Created July 14, 2017, 5:43 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « common.js ('k') | locale/en-US/new-options.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return; 105 return;
106 106
107 event.preventDefault(); 107 event.preventDefault();
108 108
109 getDocLink(event.target.id, (link) => 109 getDocLink(event.target.id, (link) =>
110 { 110 {
111 openSharePopup(link); 111 openSharePopup(link);
112 }); 112 });
113 } 113 }
114 114
115 function setLinks(id, ...args)
116 {
117 let element = E(id);
118 if (!element)
119 {
120 return;
121 }
122
123 let links = element.getElementsByTagName("a");
124
125 for (let i = 0; i < links.length; i++)
126 {
127 if (typeof args[i] == "string")
128 {
129 links[i].href = args[i];
130 links[i].setAttribute("target", "_blank");
131 }
132 else if (typeof args[i] == "function")
133 {
134 links[i].href = "javascript:void(0);";
135 links[i].addEventListener("click", args[i], false);
136 }
137 }
138 }
139
140 function openFilters() 115 function openFilters()
141 { 116 {
142 ext.backgroundPage.sendMessage({type: "app.open", what: "options"}); 117 ext.backgroundPage.sendMessage({type: "app.open", what: "options"});
143 } 118 }
144 119
145 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 120 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
146 }()); 121 }());
OLDNEW
« no previous file with comments | « common.js ('k') | locale/en-US/new-options.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld