OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 continue; | 299 continue; |
300 | 300 |
301 for (let remoteFilter of remoteSubscription.filters) | 301 for (let remoteFilter of remoteSubscription.filters) |
302 { | 302 { |
303 seenFilter[remoteFilter.text] = true; | 303 seenFilter[remoteFilter.text] = true; |
304 | 304 |
305 let filter = Filter.fromText(remoteFilter.text); | 305 let filter = Filter.fromText(remoteFilter.text); |
306 if (trackerInstance.didFilterChange(filter)) | 306 if (trackerInstance.didFilterChange(filter)) |
307 continue; | 307 continue; |
308 | 308 |
309 if (filter.subscriptions.some(function(subscription) subscription instan
ceof SpecialSubscription)) | 309 if (filter.subscriptions.some((subscription) => subscription instanceof
SpecialSubscription)) |
310 { | 310 { |
311 // Filter might have been changed remotely | 311 // Filter might have been changed remotely |
312 if (filter instanceof ActiveFilter) | 312 if (filter instanceof ActiveFilter) |
313 filter.disabled = remoteFilter.disabled; | 313 filter.disabled = remoteFilter.disabled; |
314 } | 314 } |
315 else | 315 else |
316 { | 316 { |
317 // Filter was added remotely, add it locally as well | 317 // Filter was added remotely, add it locally as well |
318 FilterStorage.addFilter(filter); | 318 FilterStorage.addFilter(filter); |
319 } | 319 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 case "filter.added": | 450 case "filter.added": |
451 case "filter.removed": | 451 case "filter.removed": |
452 case "filter.disabled": | 452 case "filter.disabled": |
453 this.addPrivateChange("filter " + item.text); | 453 this.addPrivateChange("filter " + item.text); |
454 break; | 454 break; |
455 } | 455 } |
456 } | 456 } |
457 }; | 457 }; |
458 | 458 |
459 SyncServiceObserver.init(); | 459 SyncServiceObserver.init(); |
OLD | NEW |