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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 reload: function() | 80 reload: function() |
81 { | 81 { |
82 // Remove existing entries if any | 82 // Remove existing entries if any |
83 while (this._list.firstChild) | 83 while (this._list.firstChild) |
84 this._list.removeChild(this._list.firstChild); | 84 this._list.removeChild(this._list.firstChild); |
85 | 85 |
86 // Now add all subscriptions | 86 // Now add all subscriptions |
87 let subscriptions = FilterStorage.subscriptions.filter(this._filter, this); | 87 let subscriptions = FilterStorage.subscriptions.filter(this._filter, this); |
88 if (subscriptions.length) | 88 if (subscriptions.length) |
89 { | 89 { |
90 for each (let subscription in subscriptions) | 90 for (let subscription of subscriptions) |
91 this.addSubscription(subscription, null); | 91 this.addSubscription(subscription, null); |
92 | 92 |
93 // Make sure first list item is selected after list initialization | 93 // Make sure first list item is selected after list initialization |
94 Utils.runAsync(function() | 94 Utils.runAsync(function() |
95 { | 95 { |
96 this._list.selectItem(this._list.getItemAtIndex(this._list.getIndexOfFir
stVisibleRow())); | 96 this._list.selectItem(this._list.getItemAtIndex(this._list.getIndexOfFir
stVisibleRow())); |
97 }, this); | 97 }, this); |
98 } | 98 } |
99 | 99 |
100 this._deck.selectedIndex = (subscriptions.length ? 1 : 0); | 100 this._deck.selectedIndex = (subscriptions.length ? 1 : 0); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 { | 321 { |
322 FilterStorage.addSubscription(subscription); | 322 FilterStorage.addSubscription(subscription); |
323 if (subscription instanceof DownloadableSubscription && !subscription.lastDo
wnload) | 323 if (subscription instanceof DownloadableSubscription && !subscription.lastDo
wnload) |
324 Synchronizer.execute(subscription); | 324 Synchronizer.execute(subscription); |
325 } | 325 } |
326 else | 326 else |
327 FilterStorage.removeSubscription(subscription); | 327 FilterStorage.removeSubscription(subscription); |
328 }; | 328 }; |
329 | 329 |
330 window.addEventListener("load", ListManager.init, false); | 330 window.addEventListener("load", ListManager.init, false); |
OLD | NEW |