[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-149.0a1-16.0-2] fixup! BB 41930: Remove the UI to customize accept_languages.



Title: GitLab

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:

Changes:

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

  • browser/components/preferences/main.js
    ... ... @@ -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
     
    
    ... ... @@ -3229,6 +3242,14 @@ SettingGroupManager.registerGroups({
    3229 3242
           },
    
    3230 3243
         ],
    
    3231 3244
       },
    
    3245
    +  websiteSpoofEnglish: {
    
    3246
    +    items: [
    
    3247
    +      {
    
    3248
    +        id: "websiteSpoofEnglish",
    
    3249
    +        l10nId: "languages-customize-spoof-english",
    
    3250
    +      },
    
    3251
    +    ],
    
    3252
    +  },
    
    3232 3253
       applications: {
    
    3233 3254
         id: "applicationsGroup",
    
    3234 3255
         l10nId: "applications-setting",
    
    ... ... @@ -5425,6 +5446,7 @@ var gMainPane = {
    5425 5446
         initSettingGroup("drm");
    
    5426 5447
         initSettingGroup("contrast");
    
    5427 5448
         initSettingGroup("websiteLanguage");
    
    5449
    +    initSettingGroup("websiteSpoofEnglish");
    
    5428 5450
         initSettingGroup("browsing");
    
    5429 5451
         initSettingGroup("zoom");
    
    5430 5452
         initSettingGroup("fonts");
    
    ... ... @@ -5466,22 +5488,6 @@ var gMainPane = {
    5466 5488
         }
    
    5467 5489
     
    
    5468 5490
         // setEventListener("chooseLanguage", "command", gMainPane.showLanguages);
    
    5469
    -    {
    
    5470
    -      const spoofEnglish = document.getElementById("spoofEnglish");
    
    5471
    -      const kPrefSpoofEnglish = "privacy.spoof_english";
    
    5472
    -      const preference = Preferences.add({
    
    5473
    -        id: kPrefSpoofEnglish,
    
    5474
    -        type: "int",
    
    5475
    -      });
    
    5476
    -      const spoofEnglishChanged = () => {
    
    5477
    -        spoofEnglish.checked = preference.value == 2;
    
    5478
    -      };
    
    5479
    -      spoofEnglishChanged();
    
    5480
    -      preference.on("change", spoofEnglishChanged);
    
    5481
    -      setEventListener("spoofEnglish", "command", () => {
    
    5482
    -        preference.value = spoofEnglish.checked ? 2 : 1;
    
    5483
    -      });
    
    5484
    -    }
    
    5485 5491
         // TODO (Bug 1817084) Remove this code when we disable the extension
    
    5486 5492
         setEventListener(
    
    5487 5493
           "fxtranslateButton",
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx