Loading browser/modules/URILoadingHelper.sys.mjs +22 −16 Original line number Diff line number Diff line Loading @@ -418,6 +418,28 @@ export const URILoadingHelper = { return; } // make sure users are not faced with the scary red 'tor isn't working' screen // if they navigate to about:tor before bootstrapped // // fixes tor-browser#40752 // new tabs also redirect to about:tor if browser.newtabpage.enabled is true // otherwise they go to about:blank if (lazy.TorConnect.shouldShowTorConnect) { const homeURLs = [ "about:home", "about:privatebrowsing", "about:tor", "about:welcome", ]; if ( homeURLs.includes(url) || (url === "about:newtab" && Services.prefs.getBoolPref("browser.newtabpage.enabled", false)) ) { url = lazy.TorConnect.getRedirectURL(url); } } let { allowThirdPartyFixup, postData, Loading Loading @@ -673,22 +695,6 @@ export const URILoadingHelper = { ) { event = BrowserUtils.getRootEvent(event); // make sure users are not faced with the scary red 'tor isn't working' screen // if they navigate to about:tor before bootstrapped // // fixes tor-browser#40752 // new tabs also redirect to about:tor if browser.newtabpage.enabled is true // otherwise they go to about:blank if (lazy.TorConnect.shouldShowTorConnect) { if ( url === "about:tor" || (url === "about:newtab" && Services.prefs.getBoolPref("browser.newtabpage.enabled", false)) ) { url = lazy.TorConnect.getRedirectURL(url); } } let params; if (aIgnoreButton && typeof aIgnoreButton == "object") { Loading Loading
browser/modules/URILoadingHelper.sys.mjs +22 −16 Original line number Diff line number Diff line Loading @@ -418,6 +418,28 @@ export const URILoadingHelper = { return; } // make sure users are not faced with the scary red 'tor isn't working' screen // if they navigate to about:tor before bootstrapped // // fixes tor-browser#40752 // new tabs also redirect to about:tor if browser.newtabpage.enabled is true // otherwise they go to about:blank if (lazy.TorConnect.shouldShowTorConnect) { const homeURLs = [ "about:home", "about:privatebrowsing", "about:tor", "about:welcome", ]; if ( homeURLs.includes(url) || (url === "about:newtab" && Services.prefs.getBoolPref("browser.newtabpage.enabled", false)) ) { url = lazy.TorConnect.getRedirectURL(url); } } let { allowThirdPartyFixup, postData, Loading Loading @@ -673,22 +695,6 @@ export const URILoadingHelper = { ) { event = BrowserUtils.getRootEvent(event); // make sure users are not faced with the scary red 'tor isn't working' screen // if they navigate to about:tor before bootstrapped // // fixes tor-browser#40752 // new tabs also redirect to about:tor if browser.newtabpage.enabled is true // otherwise they go to about:blank if (lazy.TorConnect.shouldShowTorConnect) { if ( url === "about:tor" || (url === "about:newtab" && Services.prefs.getBoolPref("browser.newtabpage.enabled", false)) ) { url = lazy.TorConnect.getRedirectURL(url); } } let params; if (aIgnoreButton && typeof aIgnoreButton == "object") { Loading