OLD | NEW |
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 updateSubscription(subscription); | 1206 updateSubscription(subscription); |
1207 break; | 1207 break; |
1208 case "downloading": | 1208 case "downloading": |
1209 case "downloadStatus": | 1209 case "downloadStatus": |
1210 case "homepage": | 1210 case "homepage": |
1211 case "lastDownload": | 1211 case "lastDownload": |
1212 case "title": | 1212 case "title": |
1213 updateSubscription(subscription); | 1213 updateSubscription(subscription); |
1214 break; | 1214 break; |
1215 case "added": | 1215 case "added": |
1216 let {url, recommended} = subscription; | 1216 let {url} = subscription; |
1217 // Handle custom subscription | 1217 // Handle custom subscription |
1218 if (/^~user/.test(url)) | 1218 if (/^~user/.test(url)) |
1219 { | 1219 { |
1220 loadCustomFilters(subscription.filters); | 1220 loadCustomFilters(subscription.filters); |
1221 return; | 1221 return; |
1222 } | 1222 } |
1223 else if (url in subscriptionsMap) | 1223 else if (url in subscriptionsMap) |
1224 updateSubscription(subscription); | 1224 updateSubscription(subscription); |
1225 else | 1225 else |
1226 addSubscription(subscription); | 1226 addSubscription(subscription); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 }); | 1380 }); |
1381 chrome.runtime.sendMessage({ | 1381 chrome.runtime.sendMessage({ |
1382 type: "subscriptions.listen", | 1382 type: "subscriptions.listen", |
1383 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1383 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1384 "title", "downloadStatus", "downloading"] | 1384 "title", "downloadStatus", "downloading"] |
1385 }); | 1385 }); |
1386 | 1386 |
1387 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1387 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1388 window.addEventListener("hashchange", onHashChange, false); | 1388 window.addEventListener("hashchange", onHashChange, false); |
1389 } | 1389 } |
OLD | NEW |