henry pushed to branch tor-browser-149.0a1-16.0-2 at The Tor Project / 
Applications / Tor Browser


Commits:
706872af by Henry Wilkes at 2026-03-25T16:54:05+00:00
fixup! BB 41930: Remove the UI to customize accept_languages.

BB 44793: Use settings config for spoof english checkbox.

- - - - -


2 changed files:

- browser/components/preferences/main.inc.xhtml
- browser/components/preferences/main.js


Changes:

=====================================
browser/components/preferences/main.inc.xhtml
=====================================
@@ -100,9 +100,10 @@
               languages-customize-add.label,
             " />
     -->
-    <checkbox id="spoofEnglish"
-              data-l10n-id="languages-customize-spoof-english"/>
   </hbox>
+  <!-- TODO: Integrate into the "Languages" setting-group after bugzilla bug
+     - 1972081. -->
+  <html:setting-group groupid="websiteSpoofEnglish"></html:setting-group>
 
   <checkbox id="useSystemLocale" hidden="true"
             data-l10n-id="use-system-locale"


=====================================
browser/components/preferences/main.js
=====================================
@@ -789,9 +789,22 @@ Preferences.addSetting({
   },
 });
 
+Preferences.addSetting({
+  id: "websiteSpoofEnglish",
+  pref: "privacy.spoof_english",
+  get: val => {
+    return val == 2;
+  },
+  set: val => {
+    return val ? 2 : 1;
+  },
+});
+
 Preferences.addSetting({
   id: "websiteLanguageWrapper",
   deps: ["acceptLanguages"],
+  // Hide website language settings. tor-browser#41930.
+  visible: () => false,
   onUserReorder(event, deps) {
     const { draggedIndex, targetIndex } = event.detail;
 
@@ -3233,6 +3246,14 @@ SettingGroupManager.registerGroups({
       },
     ],
   },
+  websiteSpoofEnglish: {
+    items: [
+      {
+        id: "websiteSpoofEnglish",
+        l10nId: "languages-customize-spoof-english",
+      },
+    ],
+  },
   applications: {
     id: "applicationsGroup",
     l10nId: "applications-setting",
@@ -5429,6 +5450,7 @@ var gMainPane = {
     initSettingGroup("drm");
     initSettingGroup("contrast");
     initSettingGroup("websiteLanguage");
+    initSettingGroup("websiteSpoofEnglish");
     initSettingGroup("browsing");
     initSettingGroup("zoom");
     initSettingGroup("fonts");
@@ -5470,22 +5492,6 @@ var gMainPane = {
     }
 
     // setEventListener("chooseLanguage", "command", gMainPane.showLanguages);
-    {
-      const spoofEnglish = document.getElementById("spoofEnglish");
-      const kPrefSpoofEnglish = "privacy.spoof_english";
-      const preference = Preferences.add({
-        id: kPrefSpoofEnglish,
-        type: "int",
-      });
-      const spoofEnglishChanged = () => {
-        spoofEnglish.checked = preference.value == 2;
-      };
-      spoofEnglishChanged();
-      preference.on("change", spoofEnglishChanged);
-      setEventListener("spoofEnglish", "command", () => {
-        preference.value = spoofEnglish.checked ? 2 : 1;
-      });
-    }
     // TODO (Bug 1817084) Remove this code when we disable the extension
     setEventListener(
       "fxtranslateButton",



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/706872afd7ec78d04921b2d6499ab378e8ec66c3

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/706872afd7ec78d04921b2d6499ab378e8ec66c3
You're receiving this email because of your account on gitlab.torproject.org. 
Manage all notifications: https://gitlab.torproject.org/-/profile/notifications 
| Help: https://gitlab.torproject.org/help


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to