tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit baed8491234c074b5106274181c08c3069344c56
parent bfa83e898ddaaad3a3e739db76e9c1f8813d5438
Author: Henry Wilkes <henry@torproject.org>
Date:   Mon,  2 Mar 2026 10:22:12 +0000

BB 44711: Hide unwanted setting controls.

Diffstat:
Mbrowser/components/preferences/preferences.js | 21+++++++++++++++++++++
Mbrowser/components/preferences/preferences.xhtml | 6++++++
2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js @@ -247,6 +247,7 @@ const CONFIG_PANES = Object.freeze({ groupIds: ["dnsOverHttpsAdvanced"], }, managePayments: { + skip: true, parent: "privacy", l10nId: "autofill-payment-methods-manage-payments-title", groupIds: ["managePayments"], @@ -257,6 +258,7 @@ const CONFIG_PANES = Object.freeze({ groupIds: ["profilePane"], }, etp: { + skip: true, // Skip enhanced tracking protection. tor-browser#33848. parent: "privacy", l10nId: "preferences-etp-header", groupIds: ["etpBanner", "etpAdvanced"], @@ -267,11 +269,13 @@ const CONFIG_PANES = Object.freeze({ groupIds: ["etpReset", "etpCustomize"], }, manageAddresses: { + skip: true, parent: "privacy", l10nId: "autofill-addresses-manage-addresses-title", groupIds: ["manageAddresses"], }, translations: { + skip: true, // Skip translations. tor-browser#44710. parent: "general", l10nId: "settings-translations-subpage-header", groupIds: [ @@ -281,6 +285,7 @@ const CONFIG_PANES = Object.freeze({ iconSrc: "chrome://browser/skin/translations.svg", }, aiFeatures: { + skip: true, // Skip AI pane. tor-browser#44709. l10nId: "preferences-ai-features-header", groupIds: ["debugModelManagement", "aiFeatures", "aiWindowFeatures"], module: "chrome://browser/content/preferences/config/aiFeatures.mjs", @@ -346,6 +351,22 @@ function init_all() { register_module("paneContainers", gContainersPane); for (let [id, config] of Object.entries(CONFIG_PANES)) { + // Skip over configs we do not want, including all its children. + // See tor-browser#44711. + let skip = false; + let parentConfig = config; + while (parentConfig) { + skip = parentConfig.skip; + if (skip) { + break; + } + parentConfig = parentConfig.parent + ? CONFIG_PANES[parentConfig.parent] + : undefined; + } + if (skip) { + continue; + } SettingPaneManager.registerPane(id, config); } diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml @@ -175,8 +175,12 @@ <label class="category-name" flex="1" data-l10n-id="pane-sync-title3"></label> </richlistitem> + <!-- We skip registering the "ai" pane (aiFeatures.mjs), which means + - this richlistitem is non-functional and unmanaged. We have to + - manually hide it instead. See tor-browser#44709. --> <richlistitem id="category-ai-features" class="category" + hidden="true" value="paneAiFeatures" data-l10n-id="category-ai-features" data-l10n-attrs="tooltiptext" @@ -222,7 +226,9 @@ class="category hidden-category" value="paneProfiles"/> + <!-- Hide the translations sub-pane. tor-browser#44710. --> <richlistitem + hidden="true" class="category hidden-category" value="paneTranslations"/>