Left: | ||
Right: |
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, DownloadableSubscription, |
23 SpecialSubscription} = require("subscriptionClasses"); | 23 SpecialSubscription} = require( |
kzar
2018/03/19 21:50:08
Please fix the way this is wrapped too.
Jon Sonesen
2018/03/20 23:25:18
Acknowledged.
| |
24 const {FilterStorage} = require("filterStorage"); | 24 "../adblockpluscore/lib/subscriptionClasses"); |
25 const {FilterNotifier} = require("filterNotifier"); | 25 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
26 const info = require("info"); | 26 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
27 const {Prefs} = require("prefs"); | 27 const info = require("../buildtools/info"); |
28 const {Synchronizer} = require("synchronizer"); | 28 const {Prefs} = require("./prefs"); |
29 const {Utils} = require("utils"); | 29 const {Synchronizer} = require("../adblockpluscore/lib/synchronizer"); |
30 const {initNotifications} = require("notificationHelper"); | 30 const {Utils} = require("./utils"); |
31 const {initNotifications} = require("./notificationHelper"); | |
31 const {updatesVersion} = require("../adblockplusui/lib/prefs"); | 32 const {updatesVersion} = require("../adblockplusui/lib/prefs"); |
32 | 33 |
33 let firstRun; | 34 let firstRun; |
34 let subscriptionsCallback = null; | 35 let subscriptionsCallback = null; |
35 | 36 |
36 /** | 37 /** |
37 * If there aren't any filters, the default subscriptions are added. | 38 * If there aren't any filters, the default subscriptions are added. |
38 * However, if patterns.ini already did exist and/or any preference | 39 * 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 | 40 * is set to a non-default value, this indicates that this isn't the |
40 * first run, but something went wrong. | 41 * first run, but something went wrong. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 * Sets a callback that is called with an array of subscriptions to be added | 253 * Sets a callback that is called with an array of subscriptions to be added |
253 * during initialization. The callback must return an array of subscriptions | 254 * during initialization. The callback must return an array of subscriptions |
254 * that will effectively be added. | 255 * that will effectively be added. |
255 * | 256 * |
256 * @param {function} callback | 257 * @param {function} callback |
257 */ | 258 */ |
258 exports.setSubscriptionsCallback = callback => | 259 exports.setSubscriptionsCallback = callback => |
259 { | 260 { |
260 subscriptionsCallback = callback; | 261 subscriptionsCallback = callback; |
261 }; | 262 }; |
OLD | NEW |