| Index: lib/subscriptionInit.js |
| =================================================================== |
| --- a/lib/subscriptionInit.js |
| +++ b/lib/subscriptionInit.js |
| @@ -23,11 +23,20 @@ |
| SpecialSubscription} = require("subscriptionClasses"); |
| const {FilterStorage} = require("filterStorage"); |
| const {FilterNotifier} = require("filterNotifier"); |
| +const info = require("info"); |
| const {Prefs} = require("prefs"); |
| const {Synchronizer} = require("synchronizer"); |
| const {Utils} = require("utils"); |
| const {initNotifications} = require("notificationHelper"); |
| +/** |
| + * The version of major updates that the user should be aware of. |
| + * See also Prefs.updates_version |
| + * |
| + * @type {number} |
| + */ |
| +const updatesVersion = 1; |
| + |
| let firstRun; |
| let subscriptionsCallback = null; |
| @@ -48,7 +57,7 @@ |
| if (firstRun && (!FilterStorage.firstRun || Prefs.currentVersion)) |
| exports.reinitialized = true; |
| - Prefs.currentVersion = require("info").addonVersion; |
| + Prefs.currentVersion = info.addonVersion; |
| } |
| /** |
| @@ -204,8 +213,27 @@ |
| Synchronizer.execute(subscription); |
| } |
| - if (firstRun && !Prefs.suppress_first_run_page) |
| - browser.tabs.create({url: browser.extension.getURL("firstRun.html")}); |
| + if (!Prefs.suppress_first_run_page) |
| + { |
| + let page = null; |
| + if (firstRun) |
| + { |
| + page = "firstRun.html"; |
| + } |
| + // For now we're limiting the updates page to users of |
| + // Chromium-based browsers to gage its impact |
| + else if (info.platform == "chromium" && |
| + updatesVersion > Prefs.updates_version) |
| + { |
| + page = "updates.html"; |
| + } |
| + |
| + if (page) |
| + { |
| + browser.tabs.create({url: browser.extension.getURL(page)}); |
| + Prefs.updates_version = updatesVersion; |
| + } |
| + } |
| initNotifications(); |
| } |