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 |
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 "use strict"; | 18 "use strict"; |
19 | 19 |
20 const {Filter, ActiveFilter} = require("../adblockpluscore/lib/filterClasses"); | 20 const {Filter, ActiveFilter} = require("../adblockpluscore/lib/filterClasses"); |
21 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); | 21 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
22 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); | 22 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
23 const {IO} = require("./io"); | |
24 const {Prefs} = require("./prefs"); | 23 const {Prefs} = require("./prefs"); |
25 const {SpecialSubscription} = require( | 24 const {SpecialSubscription} = |
26 "../adblockpluscore/lib/subscriptionClasses"); | 25 require("../adblockpluscore/lib/subscriptionClasses"); |
27 | 26 |
28 Promise.all([FilterNotifier.once("load"), Prefs.untilLoaded]).then(() => | 27 Promise.all([FilterNotifier.once("load"), Prefs.untilLoaded]).then(() => |
29 { | 28 { |
30 if (Prefs.data_cleanup_done) | 29 if (Prefs.data_cleanup_done) |
31 return; | 30 return; |
32 | 31 |
33 if (FilterStorage.firstRun) | 32 if (FilterStorage.firstRun) |
34 { | 33 { |
35 Prefs.data_cleanup_done = true; | 34 Prefs.data_cleanup_done = true; |
36 return; | 35 return; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 75 |
77 // Remove any existing automatic backups | 76 // Remove any existing automatic backups |
78 let backups = []; | 77 let backups = []; |
79 for (let i = 1; i < 100; i++) | 78 for (let i = 1; i < 100; i++) |
80 backups.push(`file:patterns-backup${i}.ini`); | 79 backups.push(`file:patterns-backup${i}.ini`); |
81 browser.storage.local.remove(backups, () => | 80 browser.storage.local.remove(backups, () => |
82 { | 81 { |
83 Prefs.data_cleanup_done = true; | 82 Prefs.data_cleanup_done = true; |
84 }); | 83 }); |
85 }); | 84 }); |
LEFT | RIGHT |