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-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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if (key in obj) | 65 if (key in obj) |
66 result[key] = obj[key]; | 66 result[key] = obj[key]; |
67 } | 67 } |
68 return result; | 68 return result; |
69 } | 69 } |
70 | 70 |
71 function convertSubscription(subscription) | 71 function convertSubscription(subscription) |
72 { | 72 { |
73 var obj = convertObject(["disabled", "downloadStatus", "homepage", | 73 var obj = convertObject(["disabled", "downloadStatus", "homepage", |
74 "lastDownload", "title", "url"], subscription); | 74 "lastDownload", "title", "url"], subscription); |
| 75 obj.isSpecial = subscription instanceof SpecialSubscription; |
| 76 obj.isDownloadable = subscription instanceof DownloadableSubscription; |
75 obj.isDownloading = Synchronizer.isExecuting(subscription.url); | 77 obj.isDownloading = Synchronizer.isExecuting(subscription.url); |
76 return obj; | 78 return obj; |
77 } | 79 } |
78 | 80 |
79 var convertFilter = convertObject.bind(null, ["text"]); | 81 var convertFilter = convertObject.bind(null, ["text"]); |
80 | 82 |
81 var changeListeners = new global.ext.PageMap(); | 83 var changeListeners = new global.ext.PageMap(); |
82 var listenedPreferences = Object.create(null); | 84 var listenedPreferences = Object.create(null); |
83 var listenedFilterChanges = Object.create(null); | 85 var listenedFilterChanges = Object.create(null); |
84 var messageTypes = { | 86 var messageTypes = { |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 for (var i = 0; i < subscriptions.length; i++) | 404 for (var i = 0; i < subscriptions.length; i++) |
403 { | 405 { |
404 var subscription = subscriptions[i]; | 406 var subscription = subscriptions[i]; |
405 if (subscription instanceof DownloadableSubscription) | 407 if (subscription instanceof DownloadableSubscription) |
406 Synchronizer.execute(subscription, true); | 408 Synchronizer.execute(subscription, true); |
407 } | 409 } |
408 break; | 410 break; |
409 } | 411 } |
410 }); | 412 }); |
411 })(this); | 413 })(this); |
OLD | NEW |