Loading browser/components/mullvad-browser/AboutMullvadBrowserParent.sys.mjs +13 −6 Original line number Diff line number Diff line Loading @@ -5,22 +5,29 @@ export class AboutMullvadBrowserParent extends JSWindowActorParent { receiveMessage(message) { const shouldNotifyPref = "mullvadbrowser.post_update.shouldNotify"; switch (message.name) { case "AboutMullvadBrowser:GetUpdateData": case "AboutMullvadBrowser:GetUpdateData": { if (!Services.prefs.getBoolPref(shouldNotifyPref, false)) { return Promise.resolve(null); } Services.prefs.clearUserPref(shouldNotifyPref); // Try use the same URL as the about dialog. See mullvad-browser#411. let updateURL = Services.urlFormatter.formatURLPref( "app.releaseNotesURL.aboutDialog" ); if (updateURL === "about:blank") { updateURL = Services.urlFormatter.formatURLPref( "startup.homepage_override_url" ); } return Promise.resolve({ version: Services.prefs.getCharPref( "browser.startup.homepage_override.mullvadbrowser.version" ), url: Services.prefs.getCharPref("mullvadbrowser.post_update.url", "") || Services.urlFormatter.formatURLPref( "startup.homepage_override_url" ), url: updateURL, }); } } return undefined; } } Loading
browser/components/mullvad-browser/AboutMullvadBrowserParent.sys.mjs +13 −6 Original line number Diff line number Diff line Loading @@ -5,22 +5,29 @@ export class AboutMullvadBrowserParent extends JSWindowActorParent { receiveMessage(message) { const shouldNotifyPref = "mullvadbrowser.post_update.shouldNotify"; switch (message.name) { case "AboutMullvadBrowser:GetUpdateData": case "AboutMullvadBrowser:GetUpdateData": { if (!Services.prefs.getBoolPref(shouldNotifyPref, false)) { return Promise.resolve(null); } Services.prefs.clearUserPref(shouldNotifyPref); // Try use the same URL as the about dialog. See mullvad-browser#411. let updateURL = Services.urlFormatter.formatURLPref( "app.releaseNotesURL.aboutDialog" ); if (updateURL === "about:blank") { updateURL = Services.urlFormatter.formatURLPref( "startup.homepage_override_url" ); } return Promise.resolve({ version: Services.prefs.getCharPref( "browser.startup.homepage_override.mullvadbrowser.version" ), url: Services.prefs.getCharPref("mullvadbrowser.post_update.url", "") || Services.urlFormatter.formatURLPref( "startup.homepage_override_url" ), url: updateURL, }); } } return undefined; } }