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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 /** @module subscriptionInit */ | 18 /** @module subscriptionInit */ |
19 | 19 |
20 "use strict"; | 20 "use strict"; |
21 | 21 |
22 const {Subscription, DownloadableSubscription, | 22 const {Subscription, |
23 SpecialSubscription} = require("subscriptionClasses"); | 23 DownloadableSubscription, |
24 const {FilterStorage} = require("filterStorage"); | 24 SpecialSubscription} = |
25 const {FilterNotifier} = require("filterNotifier"); | 25 require("../adblockpluscore/lib/subscriptionClasses"); |
26 const info = require("info"); | 26 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
27 const {Prefs} = require("prefs"); | 27 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
28 const {Synchronizer} = require("synchronizer"); | 28 const info = require("../buildtools/info"); |
29 const {Utils} = require("utils"); | 29 const {Prefs} = require("./prefs"); |
30 const {initNotifications} = require("notificationHelper"); | 30 const {Synchronizer} = require("../adblockpluscore/lib/synchronizer"); |
| 31 const {Utils} = require("./utils"); |
| 32 const {initNotifications} = require("./notificationHelper"); |
31 const {updatesVersion} = require("../adblockplusui/lib/prefs"); | 33 const {updatesVersion} = require("../adblockplusui/lib/prefs"); |
32 | 34 |
33 let firstRun; | 35 let firstRun; |
34 let subscriptionsCallback = null; | 36 let subscriptionsCallback = null; |
35 | 37 |
36 /** | 38 /** |
37 * If there aren't any filters, the default subscriptions are added. | 39 * If there aren't any filters, the default subscriptions are added. |
38 * However, if patterns.ini already did exist and/or any preference | 40 * However, if patterns.ini already did exist and/or any preference |
39 * is set to a non-default value, this indicates that this isn't the | 41 * is set to a non-default value, this indicates that this isn't the |
40 * first run, but something went wrong. | 42 * first run, but something went wrong. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 * Sets a callback that is called with an array of subscriptions to be added | 284 * Sets a callback that is called with an array of subscriptions to be added |
283 * during initialization. The callback must return an array of subscriptions | 285 * during initialization. The callback must return an array of subscriptions |
284 * that will effectively be added. | 286 * that will effectively be added. |
285 * | 287 * |
286 * @param {function} callback | 288 * @param {function} callback |
287 */ | 289 */ |
288 exports.setSubscriptionsCallback = callback => | 290 exports.setSubscriptionsCallback = callback => |
289 { | 291 { |
290 subscriptionsCallback = callback; | 292 subscriptionsCallback = callback; |
291 }; | 293 }; |
OLD | NEW |