Loading browser/components/BrowserContentHandler.sys.mjs +38 −14 Changes for browser/components/BrowserContentHandler.sys.mjs: 38 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -720,6 +720,23 @@ nsBrowserContentHandler.prototype = { } } // Retrieve the home page early so we can compare it against about:tor // to decide whether or not we need an override page (second tab) after // an update was applied. var startPage = ""; try { var choice = Services.prefs.getIntPref("browser.startup.page"); if (choice == 1 || choice == 3) { startPage = lazy.HomePage.get(); } } catch (e) { console.error(e); } if (startPage == "about:blank") { startPage = ""; } var override; var overridePage = ""; var additionalPage = ""; Loading Loading @@ -859,6 +876,27 @@ nsBrowserContentHandler.prototype = { "%OLD_BASE_BROWSER_VERSION%", old_forkVersion ); if (overridePage && AppConstants.BASE_BROWSER_UPDATE) { // Tor Browser: Instead of opening the post-update "override page" // directly, we ensure that about:tor will be opened, which should // notify the user that their browser was updated. // // The overridePage comes from the openURL attribute within the // updates.xml file or, if no showURL action is present, from the // startup.homepage_override_url pref. Services.prefs.setCharPref( "torbrowser.post_update.url", overridePage ); Services.prefs.setBoolPref( "torbrowser.post_update.shouldNotify", true ); // If the user's homepage is about:tor, we will inform them // about the update on that page; otherwise, we arrange to // open about:tor in a secondary tab. overridePage = startPage === "about:tor" ? "" : "about:tor"; } break; } case OVERRIDE_NEW_BUILD_ID: Loading Loading @@ -933,20 +971,6 @@ nsBrowserContentHandler.prototype = { } } var startPage = ""; try { var choice = prefb.getIntPref("browser.startup.page"); if (choice == 1 || choice == 3) { startPage = lazy.HomePage.get(); } } catch (e) { console.error(e); } if (startPage == "about:blank") { startPage = ""; } let skipStartPage = override == OVERRIDE_NEW_PROFILE && prefb.getBoolPref("browser.startup.firstrunSkipsHomepage"); Loading Loading
browser/components/BrowserContentHandler.sys.mjs +38 −14 Changes for browser/components/BrowserContentHandler.sys.mjs: 38 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -720,6 +720,23 @@ nsBrowserContentHandler.prototype = { } } // Retrieve the home page early so we can compare it against about:tor // to decide whether or not we need an override page (second tab) after // an update was applied. var startPage = ""; try { var choice = Services.prefs.getIntPref("browser.startup.page"); if (choice == 1 || choice == 3) { startPage = lazy.HomePage.get(); } } catch (e) { console.error(e); } if (startPage == "about:blank") { startPage = ""; } var override; var overridePage = ""; var additionalPage = ""; Loading Loading @@ -859,6 +876,27 @@ nsBrowserContentHandler.prototype = { "%OLD_BASE_BROWSER_VERSION%", old_forkVersion ); if (overridePage && AppConstants.BASE_BROWSER_UPDATE) { // Tor Browser: Instead of opening the post-update "override page" // directly, we ensure that about:tor will be opened, which should // notify the user that their browser was updated. // // The overridePage comes from the openURL attribute within the // updates.xml file or, if no showURL action is present, from the // startup.homepage_override_url pref. Services.prefs.setCharPref( "torbrowser.post_update.url", overridePage ); Services.prefs.setBoolPref( "torbrowser.post_update.shouldNotify", true ); // If the user's homepage is about:tor, we will inform them // about the update on that page; otherwise, we arrange to // open about:tor in a secondary tab. overridePage = startPage === "about:tor" ? "" : "about:tor"; } break; } case OVERRIDE_NEW_BUILD_ID: Loading Loading @@ -933,20 +971,6 @@ nsBrowserContentHandler.prototype = { } } var startPage = ""; try { var choice = prefb.getIntPref("browser.startup.page"); if (choice == 1 || choice == 3) { startPage = lazy.HomePage.get(); } } catch (e) { console.error(e); } if (startPage == "about:blank") { startPage = ""; } let skipStartPage = override == OVERRIDE_NEW_PROFILE && prefb.getBoolPref("browser.startup.firstrunSkipsHomepage"); Loading