henry pushed to branch tor-browser-140.1.0esr-15.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
f5edc9e2
by Henry Wilkes at 2025-08-05T15:30:39+00:00
-
be0e5337
by Henry Wilkes at 2025-08-05T15:30:39+00:00
-
26f33db1
by Henry Wilkes at 2025-08-05T15:30:39+00:00
-
61677384
by Henry Wilkes at 2025-08-05T15:30:39+00:00
4 changed files:
- browser/app/profile/000-tor-browser.js
- browser/components/urlbar/QuickActionsLoaderDefault.sys.mjs
- browser/components/urlbar/SearchModeSwitcher.sys.mjs
- toolkit/content/widgets/moz-support-link/moz-support-link.mjs
Changes:
| ... | ... | @@ -48,6 +48,9 @@ pref("extensions.torbutton.use_nontor_proxy", false); |
| 48 | 48 | // Browser home page:
|
| 49 | 49 | pref("browser.startup.homepage", "about:tor");
|
| 50 | 50 | |
| 51 | +// General browser support url. tor-browser#43864 and tor-browser#40899.
|
|
| 52 | +pref("browser.base-browser-support-url", "https://support.torproject.org/tbb");
|
|
| 53 | + |
|
| 51 | 54 | // tor-browser#40701: Add new download warning
|
| 52 | 55 | pref("browser.download.showTorWarning", true);
|
| 53 | 56 |
| ... | ... | @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { |
| 13 | 13 | ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
| 14 | 14 | ActionsProviderQuickActions:
|
| 15 | 15 | "resource:///modules/ActionsProviderQuickActions.sys.mjs",
|
| 16 | + PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
|
| 16 | 17 | });
|
| 17 | 18 | |
| 18 | 19 | import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
| ... | ... | @@ -78,6 +79,9 @@ const DEFAULT_ACTIONS = { |
| 78 | 79 | icon: "chrome://mozapps/skin/extensions/category-extensions.svg",
|
| 79 | 80 | label: "quickactions-addons",
|
| 80 | 81 | onPick: openAddonsUrl("addons://discover/"),
|
| 82 | + // Hide in base-browser, since we don't want to open extensions
|
|
| 83 | + // "recommendations" tab. tor-browser#43864.
|
|
| 84 | + disabled: () => true,
|
|
| 81 | 85 | },
|
| 82 | 86 | bookmarks: {
|
| 83 | 87 | l10nCommands: ["quickactions-cmd-bookmarks", "quickactions-bookmarks2"],
|
| ... | ... | @@ -100,6 +104,12 @@ const DEFAULT_ACTIONS = { |
| 100 | 104 | .document.getElementById("Tools:Sanitize")
|
| 101 | 105 | .doCommand();
|
| 102 | 106 | },
|
| 107 | + // Disable in permanent private browsing. tor-browser#43864.
|
|
| 108 | + // NOTE: This should also be disabled in private windows, but we don't have
|
|
| 109 | + // access to a Window element to check. See mozilla bug 1980912.
|
|
| 110 | + disabled: () => {
|
|
| 111 | + return lazy.PrivateBrowsingUtils.permanentPrivateBrowsing;
|
|
| 112 | + },
|
|
| 103 | 113 | },
|
| 104 | 114 | downloads: {
|
| 105 | 115 | l10nCommands: ["quickactions-cmd-downloads"],
|
| ... | ... | @@ -112,13 +122,18 @@ const DEFAULT_ACTIONS = { |
| 112 | 122 | icon: "chrome://mozapps/skin/extensions/category-extensions.svg",
|
| 113 | 123 | label: "quickactions-extensions",
|
| 114 | 124 | onPick: openAddonsUrl("addons://list/extension"),
|
| 125 | + // Hide in base-browser since we do not want to encourage users to change
|
|
| 126 | + // their extensions/addons. tor-browser#43864.
|
|
| 127 | + disabled: () => true,
|
|
| 115 | 128 | },
|
| 116 | 129 | help: {
|
| 117 | 130 | l10nCommands: ["quickactions-cmd-help"],
|
| 118 | 131 | icon: "chrome://global/skin/icons/help.svg",
|
| 119 | 132 | label: "quickactions-help",
|
| 133 | + // Open the base-browser support/help page, rather than Firefox's.
|
|
| 134 | + // tor-browser#43864.
|
|
| 120 | 135 | onPick: openUrlFun(
|
| 121 | - "https://support.mozilla.org/products/firefox?as=u&utm_source=inproduct"
|
|
| 136 | + Services.prefs.getStringPref("browser.base-browser-support-url", "")
|
|
| 122 | 137 | ),
|
| 123 | 138 | },
|
| 124 | 139 | firefoxview: {
|
| ... | ... | @@ -128,6 +143,9 @@ const DEFAULT_ACTIONS = { |
| 128 | 143 | onPick: () => {
|
| 129 | 144 | lazy.BrowserWindowTracker.getTopWindow().FirefoxViewHandler.openTab();
|
| 130 | 145 | },
|
| 146 | + // Hide in base-browser since firefoxview is disabled.
|
|
| 147 | + // tor-browser#43864 and tor-browser#42037.
|
|
| 148 | + disabled: () => true,
|
|
| 131 | 149 | },
|
| 132 | 150 | inspect: {
|
| 133 | 151 | l10nCommands: ["quickactions-cmd-inspector2"],
|
| ... | ... | @@ -311,6 +329,9 @@ export class QuickActionsLoaderDefault { |
| 311 | 329 | let keys = Object.keys(DEFAULT_ACTIONS);
|
| 312 | 330 | for (const key of keys) {
|
| 313 | 331 | let actionData = DEFAULT_ACTIONS[key];
|
| 332 | + if (actionData.disabled?.()) {
|
|
| 333 | + continue;
|
|
| 334 | + }
|
|
| 314 | 335 | let messages = await lazy.gFluentStrings.formatMessages(
|
| 315 | 336 | actionData.l10nCommands.map(id => ({ id }))
|
| 316 | 337 | );
|
| ... | ... | @@ -413,6 +413,15 @@ export class SearchModeSwitcher { |
| 413 | 413 | if (!lazy.UrlbarPrefs.get(pref)) {
|
| 414 | 414 | continue;
|
| 415 | 415 | }
|
| 416 | + if (
|
|
| 417 | + source === lazy.UrlbarUtils.RESULT_SOURCE.HISTORY &&
|
|
| 418 | + lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
|
|
| 419 | + ) {
|
|
| 420 | + // Do not show the search history option in PBM. tor-browser#43864.
|
|
| 421 | + // Although, it can still be triggered with "^" restrict keyword or
|
|
| 422 | + // through an app menu item. See also mozilla bug 1980928.
|
|
| 423 | + continue;
|
|
| 424 | + }
|
|
| 416 | 425 | let name = lazy.UrlbarUtils.getResultSourceName(source);
|
| 417 | 426 | let { icon } = await this.#getDisplayedEngineDetails({
|
| 418 | 427 | source,
|
| ... | ... | @@ -113,7 +113,7 @@ export default class MozSupportLink extends HTMLAnchorElement { |
| 113 | 113 | return;
|
| 114 | 114 | }
|
| 115 | 115 | let supportPage = this.getAttribute("support-page") ?? "";
|
| 116 | - // For tor-browser we sometimes want to override firefox support links with
|
|
| 116 | + // For base-browser we sometimes want to override firefox support links with
|
|
| 117 | 117 | // our own.
|
| 118 | 118 | // See tor-browser#40899.
|
| 119 | 119 | switch (supportPage) {
|
| ... | ... | @@ -122,7 +122,10 @@ export default class MozSupportLink extends HTMLAnchorElement { |
| 122 | 122 | // Instead of directing to support for preferences, we link to general
|
| 123 | 123 | // tor browser support.
|
| 124 | 124 | // See tor-browser#32092.
|
| 125 | - this.href = "https://support.torproject.org/tbb";
|
|
| 125 | + this.href = Services.prefs.getStringPref(
|
|
| 126 | + "browser.base-browser-support-url",
|
|
| 127 | + ""
|
|
| 128 | + );
|
|
| 126 | 129 | return;
|
| 127 | 130 | // Fall through to support.mozilla.org
|
| 128 | 131 | }
|