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

Side by Side Diff: firstRun.js

Issue 6432313504169984: Issue 1663 - Various Firefox-related changes of the first-run page (Closed)
Patch Set: Updated fake background page Created Jan. 6, 2015, 10:34 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 | « firstRun.html ('k') | i18n.js » ('j') | i18n.js » ('J')
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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 "use strict"; 18 "use strict";
19 19
20 (function() 20 (function()
21 { 21 {
22 function E(id)
23 {
24 return document.getElementById(id);
25 }
26
22 // Load subscriptions for features 27 // Load subscriptions for features
23 var featureSubscriptions = [ 28 var featureSubscriptions = [
24 { 29 {
25 feature: "malware", 30 feature: "malware",
26 homepage: "http://malwaredomains.com/", 31 homepage: "http://malwaredomains.com/",
27 title: "Malware Domains", 32 title: "Malware Domains",
28 url: "https://easylist-downloads.adblockplus.org/malwaredomains_full.txt" 33 url: "https://easylist-downloads.adblockplus.org/malwaredomains_full.txt"
29 }, 34 },
30 { 35 {
31 feature: "social", 36 feature: "social",
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ext.onMessage.addListener(function(message) 112 ext.onMessage.addListener(function(message)
108 { 113 {
109 if (message.type == "subscriptions.listen") 114 if (message.type == "subscriptions.listen")
110 { 115 {
111 updateToggleButtons(); 116 updateToggleButtons();
112 updateSocialLinks(); 117 updateSocialLinks();
113 } 118 }
114 }); 119 });
115 ext.backgroundPage.sendMessage({ 120 ext.backgroundPage.sendMessage({
116 type: "subscriptions.listen", 121 type: "subscriptions.listen",
117 filter: ["added", "removed", "disabled"] 122 filter: ["added", "removed", "updated", "disabled"]
118 }); 123 });
119 } 124 }
120 125
121 function initToggleSubscriptionButton(featureSubscription) 126 function initToggleSubscriptionButton(featureSubscription)
122 { 127 {
123 var feature = featureSubscription.feature; 128 var feature = featureSubscription.feature;
124 129
125 var element = E("toggle-" + feature); 130 var element = E("toggle-" + feature);
126 element.addEventListener("click", function(event) 131 element.addEventListener("click", function(event)
127 { 132 {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 { 276 {
272 var button = E("toggle-" + feature); 277 var button = E("toggle-" + feature);
273 if (isEnabled) 278 if (isEnabled)
274 button.classList.remove("off"); 279 button.classList.remove("off");
275 else 280 else
276 button.classList.add("off"); 281 button.classList.add("off");
277 } 282 }
278 283
279 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 284 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
280 })(); 285 })();
OLDNEW
« no previous file with comments | « firstRun.html ('k') | i18n.js » ('j') | i18n.js » ('J')

Powered by Google App Engine
This is Rietveld