| ... |
... |
@@ -789,9 +789,22 @@ Preferences.addSetting({ |
|
789
|
789
|
},
|
|
790
|
790
|
});
|
|
791
|
791
|
|
|
|
792
|
+Preferences.addSetting({
|
|
|
793
|
+ id: "websiteSpoofEnglish",
|
|
|
794
|
+ pref: "privacy.spoof_english",
|
|
|
795
|
+ get: val => {
|
|
|
796
|
+ return val == 2;
|
|
|
797
|
+ },
|
|
|
798
|
+ set: val => {
|
|
|
799
|
+ return val ? 2 : 1;
|
|
|
800
|
+ },
|
|
|
801
|
+});
|
|
|
802
|
+
|
|
792
|
803
|
Preferences.addSetting({
|
|
793
|
804
|
id: "websiteLanguageWrapper",
|
|
794
|
805
|
deps: ["acceptLanguages"],
|
|
|
806
|
+ // Hide website language settings. tor-browser#41930.
|
|
|
807
|
+ visible: () => false,
|
|
795
|
808
|
onUserReorder(event, deps) {
|
|
796
|
809
|
const { draggedIndex, targetIndex } = event.detail;
|
|
797
|
810
|
|
| ... |
... |
@@ -3233,6 +3246,14 @@ SettingGroupManager.registerGroups({ |
|
3233
|
3246
|
},
|
|
3234
|
3247
|
],
|
|
3235
|
3248
|
},
|
|
|
3249
|
+ websiteSpoofEnglish: {
|
|
|
3250
|
+ items: [
|
|
|
3251
|
+ {
|
|
|
3252
|
+ id: "websiteSpoofEnglish",
|
|
|
3253
|
+ l10nId: "languages-customize-spoof-english",
|
|
|
3254
|
+ },
|
|
|
3255
|
+ ],
|
|
|
3256
|
+ },
|
|
3236
|
3257
|
applications: {
|
|
3237
|
3258
|
id: "applicationsGroup",
|
|
3238
|
3259
|
l10nId: "applications-setting",
|
| ... |
... |
@@ -5429,6 +5450,7 @@ var gMainPane = { |
|
5429
|
5450
|
initSettingGroup("drm");
|
|
5430
|
5451
|
initSettingGroup("contrast");
|
|
5431
|
5452
|
initSettingGroup("websiteLanguage");
|
|
|
5453
|
+ initSettingGroup("websiteSpoofEnglish");
|
|
5432
|
5454
|
initSettingGroup("browsing");
|
|
5433
|
5455
|
initSettingGroup("zoom");
|
|
5434
|
5456
|
initSettingGroup("fonts");
|
| ... |
... |
@@ -5470,22 +5492,6 @@ var gMainPane = { |
|
5470
|
5492
|
}
|
|
5471
|
5493
|
|
|
5472
|
5494
|
// setEventListener("chooseLanguage", "command", gMainPane.showLanguages);
|
|
5473
|
|
- {
|
|
5474
|
|
- const spoofEnglish = document.getElementById("spoofEnglish");
|
|
5475
|
|
- const kPrefSpoofEnglish = "privacy.spoof_english";
|
|
5476
|
|
- const preference = Preferences.add({
|
|
5477
|
|
- id: kPrefSpoofEnglish,
|
|
5478
|
|
- type: "int",
|
|
5479
|
|
- });
|
|
5480
|
|
- const spoofEnglishChanged = () => {
|
|
5481
|
|
- spoofEnglish.checked = preference.value == 2;
|
|
5482
|
|
- };
|
|
5483
|
|
- spoofEnglishChanged();
|
|
5484
|
|
- preference.on("change", spoofEnglishChanged);
|
|
5485
|
|
- setEventListener("spoofEnglish", "command", () => {
|
|
5486
|
|
- preference.value = spoofEnglish.checked ? 2 : 1;
|
|
5487
|
|
- });
|
|
5488
|
|
- }
|
|
5489
|
5495
|
// TODO (Bug 1817084) Remove this code when we disable the extension
|
|
5490
|
5496
|
setEventListener(
|
|
5491
|
5497
|
"fxtranslateButton",
|