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

Side by Side Diff: chrome/content/ui/firstRun.js

Issue 5978545083908096: Relocating sharing section (Closed)
Patch Set: deleted unnecessary translations Created Nov. 15, 2013, 11:49 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
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-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 updateToggleButton(featureSubscription.feature, isSubscriptionEnabled( featureSubscription)); 80 updateToggleButton(featureSubscription.feature, isSubscriptionEnabled( featureSubscription));
81 } 81 }
82 } 82 }
83 } 83 }
84 FilterNotifier.addListener(filterListener); 84 FilterNotifier.addListener(filterListener);
85 window.addEventListener("unload", function(event) 85 window.addEventListener("unload", function(event)
86 { 86 {
87 FilterNotifier.removeListener(filterListener); 87 FilterNotifier.removeListener(filterListener);
88 }, false); 88 }, false);
89 89
90 // You can click activate-feature or one of the icons to toggle the features area
91 E("activate-features").addEventListener("click", toggleFeature, false);
92 E("can-do-more-overview").addEventListener("click", toggleFeature, false);
93
94 initSocialLinks(); 90 initSocialLinks();
95 } 91 }
96 92
97 function toggleFeature()
98 {
99 E("can-do-more").classList.toggle("expanded");
100 }
101
102 function isSubscriptionEnabled(featureSubscription) 93 function isSubscriptionEnabled(featureSubscription)
103 { 94 {
104 return featureSubscription.url in FilterStorage.knownSubscriptions 95 return featureSubscription.url in FilterStorage.knownSubscriptions
105 && !Subscription.fromURL(featureSubscription.url).disabled; 96 && !Subscription.fromURL(featureSubscription.url).disabled;
106 } 97 }
107 98
108 function setToggleSubscriptionButton(featureSubscription) 99 function setToggleSubscriptionButton(featureSubscription)
109 { 100 {
110 var feature = featureSubscription.feature; 101 var feature = featureSubscription.feature;
111 102
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 { 230 {
240 var button = E("toggle-" + feature); 231 var button = E("toggle-" + feature);
241 if (isEnabled) 232 if (isEnabled)
242 button.classList.remove("off"); 233 button.classList.remove("off");
243 else 234 else
244 button.classList.add("off"); 235 button.classList.add("off");
245 } 236 }
246 237
247 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 238 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
248 })(); 239 })();
OLDNEW

Powered by Google App Engine
This is Rietveld