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

Side by Side Diff: options.js

Issue 29338315: Issue 3801 - Add pre-configurable preference for additional subscriptions (Closed)
Patch Set: Created March 15, 2016, 1:40 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 | « lib/subscriptionInit.js ('k') | no next file » | 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 var removeButton = element.getElementsByClassName("subscriptionRemoveButton")[ 0]; 665 var removeButton = element.getElementsByClassName("subscriptionRemoveButton")[ 0];
666 removeButton.setAttribute("title", removeButton.textContent); 666 removeButton.setAttribute("title", removeButton.textContent);
667 removeButton.textContent = "\xD7"; 667 removeButton.textContent = "\xD7";
668 removeButton.addEventListener("click", function() 668 removeButton.addEventListener("click", function()
669 { 669 {
670 if (!confirm(i18n.getMessage("global_remove_subscription_warning"))) 670 if (!confirm(i18n.getMessage("global_remove_subscription_warning")))
671 return; 671 return;
672 672
673 FilterStorage.removeSubscription(subscription); 673 FilterStorage.removeSubscription(subscription);
674 }, false); 674 }, false);
675 if (Prefs.additional_subscriptions.indexOf(subscription.url) != -1)
676 removeButton.style.visibility = "hidden";
675 677
676 var enabled = element.getElementsByClassName("subscriptionEnabled")[0]; 678 var enabled = element.getElementsByClassName("subscriptionEnabled")[0];
677 enabled.addEventListener("click", function() 679 enabled.addEventListener("click", function()
678 { 680 {
679 if (subscription.disabled == !enabled.checked) 681 if (subscription.disabled == !enabled.checked)
680 return; 682 return;
681 683
682 subscription.disabled = !enabled.checked; 684 subscription.disabled = !enabled.checked;
683 }, false); 685 }, false);
684 686
(...skipping 16 matching lines...) Expand all
701 links[i].href = arguments[i + 1]; 703 links[i].href = arguments[i + 1];
702 links[i].setAttribute("target", "_blank"); 704 links[i].setAttribute("target", "_blank");
703 } 705 }
704 else if (typeof arguments[i + 1] == "function") 706 else if (typeof arguments[i + 1] == "function")
705 { 707 {
706 links[i].href = "javascript:void(0);"; 708 links[i].href = "javascript:void(0);";
707 links[i].addEventListener("click", arguments[i + 1], false); 709 links[i].addEventListener("click", arguments[i + 1], false);
708 } 710 }
709 } 711 }
710 } 712 }
OLDNEW
« no previous file with comments | « lib/subscriptionInit.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld