Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 FilterNotifier.addListener(action => | 42 FilterNotifier.addListener(action => |
43 { | 43 { |
44 if (action === "load") | 44 if (action === "load") |
45 { | 45 { |
46 let {FilterStorage} = require("filterStorage"); | 46 let {FilterStorage} = require("filterStorage"); |
47 if (FilterStorage.firstRun) | 47 if (FilterStorage.firstRun) |
48 { | 48 { |
49 // No data, must be a new user or someone with corrupted data - initialize | 49 // No data, must be a new user or someone with corrupted data - initialize |
50 // with default settings | 50 // with default settings |
51 | 51 |
52 let {Subscription, DownloadableSubscription} = | 52 const {Subscription, DownloadableSubscription} = |
sergei
2017/09/18 07:59:05
should it and a couple of lines below be rather co
hub
2017/09/18 12:43:05
Done.
| |
53 require("subscriptionClasses"); | 53 require("subscriptionClasses"); |
54 let {Synchronizer} = require("synchronizer"); | 54 const {Synchronizer} = require("synchronizer"); |
55 let {Utils} = require("utils"); | 55 const {Utils} = require("utils"); |
56 | 56 |
57 if (Prefs.first_run_subscription_auto_select) | 57 if (Prefs.first_run_subscription_auto_select) |
58 { | 58 { |
59 let subscriptions = require("subscriptions.xml"); | 59 let subscriptions = require("subscriptions.xml"); |
60 let node = Utils.chooseFilterSubscription(subscriptions); | 60 let node = Utils.chooseFilterSubscription(subscriptions); |
61 if (node) | 61 if (node) |
62 { | 62 { |
63 let subscription = Subscription.fromURL(node.url); | 63 let subscription = Subscription.fromURL(node.url); |
64 subscription.disabled = false; | 64 subscription.disabled = false; |
65 subscription.title = node.title; | 65 subscription.title = node.title; |
(...skipping 11 matching lines...) Expand all Loading... | |
77 if (aaSubscription instanceof DownloadableSubscription && | 77 if (aaSubscription instanceof DownloadableSubscription && |
78 !aaSubscription.lastDownload) | 78 !aaSubscription.lastDownload) |
79 Synchronizer.execute(aaSubscription); | 79 Synchronizer.execute(aaSubscription); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 filtersInitDone = true; | 83 filtersInitDone = true; |
84 checkInitialized(); | 84 checkInitialized(); |
85 } | 85 } |
86 }); | 86 }); |
LEFT | RIGHT |