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

Delta Between Two Patch Sets: options.js

Issue 29339651: Issue 3915 - Avoid listing special subscriptions (Closed)
Left Patch Set: Created April 12, 2016, 12:09 p.m.
Right Patch Set: Avoid listing special subscriptions Created April 13, 2016, 8:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « messageResponder.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 updateShareLink(); 948 updateShareLink();
949 break; 949 break;
950 } 950 }
951 } 951 }
952 952
953 function onSubscriptionMessage(action, subscription) 953 function onSubscriptionMessage(action, subscription)
954 { 954 {
955 switch (action) 955 switch (action)
956 { 956 {
957 case "added": 957 case "added":
958 if (subscription.isSpecial)
kzar 2016/04/13 08:05:11 Note: I wasn't sure how to test this.
959 return;
960
958 updateSubscription(subscription); 961 updateSubscription(subscription);
959 updateShareLink(); 962 updateShareLink();
960 963
961 var knownSubscription = subscriptionsMap[subscription.url]; 964 var knownSubscription = subscriptionsMap[subscription.url];
962 if (knownSubscription) 965 if (knownSubscription)
963 collections.filterLists.addItems(knownSubscription); 966 collections.filterLists.addItems(knownSubscription);
964 else 967 else
965 collections.filterLists.addItems(subscription); 968 collections.filterLists.addItems(subscription);
966 break; 969 break;
967 case "disabled": 970 case "disabled":
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 }); 1152 });
1150 ext.backgroundPage.sendMessage( 1153 ext.backgroundPage.sendMessage(
1151 { 1154 {
1152 type: "subscriptions.listen", 1155 type: "subscriptions.listen",
1153 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1156 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1154 "title", "downloadStatus", "downloading"] 1157 "title", "downloadStatus", "downloading"]
1155 }); 1158 });
1156 1159
1157 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1160 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1158 })(); 1161 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld