Loading browser/components/preferences/main.inc.xhtml +3 −2 Original line number Diff line number Diff line Loading @@ -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" Loading browser/components/preferences/main.js +22 −16 Original line number Diff line number Diff line Loading @@ -794,9 +794,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; Loading Loading @@ -3028,6 +3041,14 @@ SettingGroupManager.registerGroups({ }, ], }, websiteSpoofEnglish: { items: [ { id: "websiteSpoofEnglish", l10nId: "languages-customize-spoof-english", }, ], }, applications: { id: "applicationsGroup", l10nId: "applications-setting", Loading Loading @@ -5246,6 +5267,7 @@ var gMainPane = { initSettingGroup("drm"); initSettingGroup("contrast"); initSettingGroup("websiteLanguage"); initSettingGroup("websiteSpoofEnglish"); initSettingGroup("browsing"); initSettingGroup("zoom"); initSettingGroup("fonts"); Loading Loading @@ -5287,22 +5309,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", Loading Loading
browser/components/preferences/main.inc.xhtml +3 −2 Original line number Diff line number Diff line Loading @@ -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" Loading
browser/components/preferences/main.js +22 −16 Original line number Diff line number Diff line Loading @@ -794,9 +794,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; Loading Loading @@ -3028,6 +3041,14 @@ SettingGroupManager.registerGroups({ }, ], }, websiteSpoofEnglish: { items: [ { id: "websiteSpoofEnglish", l10nId: "languages-customize-spoof-english", }, ], }, applications: { id: "applicationsGroup", l10nId: "applications-setting", Loading Loading @@ -5246,6 +5267,7 @@ var gMainPane = { initSettingGroup("drm"); initSettingGroup("contrast"); initSettingGroup("websiteLanguage"); initSettingGroup("websiteSpoofEnglish"); initSettingGroup("browsing"); initSettingGroup("zoom"); initSettingGroup("fonts"); Loading Loading @@ -5287,22 +5309,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", Loading