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

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

Issue 11089006: Be more selective for the sharing fallback (Closed)
Patch Set: Created July 9, 2013, 12:20 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 networks.forEach(function(network) 206 networks.forEach(function(network)
207 { 207 {
208 var link = E("share-" + network); 208 var link = E("share-" + network);
209 link.addEventListener("click", onSocialLinkClick, false); 209 link.addEventListener("click", onSocialLinkClick, false);
210 }); 210 });
211 } 211 }
212 212
213 function onSocialLinkClick(event) 213 function onSocialLinkClick(event)
214 { 214 {
215 // Don't open the share page if the sharing script would be blocked 215 // Don't open the share page if the sharing script would be blocked
216 var filter = defaultMatcher.matchesAny(event.target.getAttribute("_script"), "SCRIPT", "adblockplus.org", true); 216 var filter = defaultMatcher.matchesAny(event.target.getAttribute("data-scrip t"), "SCRIPT", "adblockplus.org", true);
217 if (!(filter instanceof BlockingFilter)) 217 if (!(filter instanceof BlockingFilter))
218 { 218 {
219 event.preventDefault(); 219 event.preventDefault();
220 openSharePopup(Utils.getDocLink(event.target.id)); 220 openSharePopup(Utils.getDocLink(event.target.id));
221 } 221 }
222 } 222 }
223 223
224 function setLinks(id) 224 function setLinks(id)
225 { 225 {
226 var element = E(id); 226 var element = E(id);
(...skipping 30 matching lines...) Expand all
257 { 257 {
258 var button = E("toggle-" + feature); 258 var button = E("toggle-" + feature);
259 if (isEnabled) 259 if (isEnabled)
260 button.classList.remove("off"); 260 button.classList.remove("off");
261 else 261 else
262 button.classList.add("off"); 262 button.classList.add("off");
263 } 263 }
264 264
265 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 265 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
266 })(); 266 })();
OLDNEW

Powered by Google App Engine
This is Rietveld