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 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 dataCorrupted = true; | 284 dataCorrupted = true; |
285 }).then(() => | 285 }).then(() => |
286 { | 286 { |
287 if (!Prefs.suppress_first_run_page) | 287 if (!Prefs.suppress_first_run_page) |
288 { | 288 { |
289 // Always show the first run page if a data corruption was detected | 289 // Always show the first run page if a data corruption was detected |
290 // (either through failure of reading from or writing to storage.local). | 290 // (either through failure of reading from or writing to storage.local). |
291 // The first run page notifies the user about the data corruption. | 291 // The first run page notifies the user about the data corruption. |
292 let url; | 292 let url; |
293 if (firstRun || dataCorrupted) | 293 if (firstRun || dataCorrupted) |
294 url = "firstRun.html"; | 294 url = "first-run.html"; |
295 else | 295 else |
296 url = "updates.html"; | 296 url = "updates.html"; |
297 browser.tabs.create({url}); | 297 browser.tabs.create({url}); |
298 } | 298 } |
299 }); | 299 }); |
300 } | 300 } |
301 } | 301 } |
302 | 302 |
303 Promise.all([ | 303 Promise.all([ |
304 filterNotifier.once("load"), | 304 filterNotifier.once("load"), |
(...skipping 29 matching lines...) Expand all Loading... |
334 * | 334 * |
335 * @param {function} callback | 335 * @param {function} callback |
336 */ | 336 */ |
337 exports.setSubscriptionsCallback = callback => | 337 exports.setSubscriptionsCallback = callback => |
338 { | 338 { |
339 subscriptionsCallback = callback; | 339 subscriptionsCallback = callback; |
340 }; | 340 }; |
341 | 341 |
342 // Exports for tests only | 342 // Exports for tests only |
343 exports.chooseFilterSubscriptions = chooseFilterSubscriptions; | 343 exports.chooseFilterSubscriptions = chooseFilterSubscriptions; |
OLD | NEW |