henry pushed to branch mullvad-browser-149.0a1-16.0-2 at The Tor Project / Applications / Mullvad Browser Commits: df9fc351 by Henry Wilkes at 2026-03-25T17:04:31+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; @@ -3229,6 +3242,14 @@ SettingGroupManager.registerGroups({ }, ], }, + websiteSpoofEnglish: { + items: [ + { + id: "websiteSpoofEnglish", + l10nId: "languages-customize-spoof-english", + }, + ], + }, applications: { id: "applicationsGroup", l10nId: "applications-setting", @@ -5425,6 +5446,7 @@ var gMainPane = { initSettingGroup("drm"); initSettingGroup("contrast"); initSettingGroup("websiteLanguage"); + initSettingGroup("websiteSpoofEnglish"); initSettingGroup("browsing"); initSettingGroup("zoom"); initSettingGroup("fonts"); @@ -5466,22 +5488,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/mullvad-browser/-/commit/df9f... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/df9f... 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
participants (1)
-
henry (@henry)