Pier Angelo Vendrame pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

4 changed files:

Changes:

  • toolkit/components/search/AppProvidedSearchEngine.sys.mjs
    ... ... @@ -116,8 +116,10 @@ class IconHandler {
    116 116
           await this.#buildIconMap();
    
    117 117
         }
    
    118 118
     
    
    119
    -    return this.#iconMap.get(engineIdentifier);
    
    120
    -    // eslint-disable-next-line no-unreachable
    
    119
    +    if (AppConstants.BASE_BROWSER_VERSION) {
    
    120
    +      return this.#iconMap.get(engineIdentifier);
    
    121
    +    }
    
    122
    +
    
    121 123
         let iconList = this.#iconMap.get(this.getKey(engineIdentifier)) || [];
    
    122 124
         return iconList.filter(r =>
    
    123 125
           this.#identifierMatches(engineIdentifier, r.engineIdentifiers)
    
    ... ... @@ -223,7 +225,7 @@ class IconHandler {
    223 225
             Object.entries(
    
    224 226
               await (
    
    225 227
                 await fetch(
    
    226
    -              "chrome://global/content/search/torBrowserSearchEngineIcons.json"
    
    228
    +              "chrome://global/content/search/base-browser-search-engine-icons.json"
    
    227 229
                 )
    
    228 230
               ).json()
    
    229 231
             )
    

  • toolkit/components/search/SearchEngineSelector.sys.mjs
    ... ... @@ -97,7 +97,9 @@ export class SearchEngineSelector {
    97 97
         let { promise, resolve } = Promise.withResolvers();
    
    98 98
         this._getConfigurationPromise = promise;
    
    99 99
         this._configuration = await (
    
    100
    -      await fetch("chrome://global/content/search/torBrowserSearchEngines.json")
    
    100
    +      await fetch(
    
    101
    +        "chrome://global/content/search/base-browser-search-engines.json"
    
    102
    +      )
    
    101 103
         ).json();
    
    102 104
         this._configurationOverrides = [];
    
    103 105
         resolve(this._configuration);
    

  • toolkit/components/search/content/torBrowserSearchEngineIcons.jsontoolkit/components/search/content/base-browser-search-engine-icons.json
    1 1
     {
    
    2 2
       "ddg": [
    
    3
    -    {
    
    4
    -      "url": "chrome://global/content/search/duckduckgo.ico",
    
    5
    -      "imageSize": 32
    
    6
    -    }
    
    3
    +    { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
    
    7 4
       ],
    
    8 5
       "ddg-onion": [
    
    9
    -    {
    
    10
    -      "url": "chrome://global/content/search/duckduckgo.ico",
    
    11
    -      "imageSize": 32
    
    12
    -    }
    
    6
    +    { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
    
    13 7
       ],
    
    14 8
       "startpage": [
    
    15 9
         {
    
    ... ... @@ -32,9 +26,6 @@
    32 26
         }
    
    33 27
       ],
    
    34 28
       "wikipedia": [
    
    35
    -    {
    
    36
    -      "url": "chrome://global/content/search/wikipedia.ico",
    
    37
    -      "imageSize": 32
    
    38
    -    }
    
    29
    +    { "url": "chrome://global/content/search/wikipedia.ico", "imageSize": 32 }
    
    39 30
       ]
    
    40 31
     }

  • toolkit/components/search/content/torBrowserSearchEngines.jsontoolkit/components/search/content/base-browser-search-engines.json
    ... ... @@ -15,13 +15,7 @@
    15 15
         "id": "04e99a38-13ee-47d8-8aa4-64482b3dea99",
    
    16 16
         "identifier": "ddg",
    
    17 17
         "recordType": "engine",
    
    18
    -    "variants": [
    
    19
    -      {
    
    20
    -        "environment": {
    
    21
    -          "allRegionsAndLocales": true
    
    22
    -        }
    
    23
    -      }
    
    24
    -    ]
    
    18
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    25 19
       },
    
    26 20
       {
    
    27 21
         "base": {
    
    ... ... @@ -39,13 +33,7 @@
    39 33
         "id": "1e431da4-a60c-4411-9251-a95a841d451f",
    
    40 34
         "identifier": "ddg-onion",
    
    41 35
         "recordType": "engine",
    
    42
    -    "variants": [
    
    43
    -      {
    
    44
    -        "environment": {
    
    45
    -          "allRegionsAndLocales": true
    
    46
    -        }
    
    47
    -      }
    
    48
    -    ]
    
    36
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    49 37
       },
    
    50 38
       {
    
    51 39
         "base": {
    
    ... ... @@ -63,13 +51,7 @@
    63 51
         "id": "927bbd9f-b2f3-48b4-8974-1c1148028f4d",
    
    64 52
         "identifier": "startpage",
    
    65 53
         "recordType": "engine",
    
    66
    -    "variants": [
    
    67
    -      {
    
    68
    -        "environment": {
    
    69
    -          "allRegionsAndLocales": true
    
    70
    -        }
    
    71
    -      }
    
    72
    -    ]
    
    54
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    73 55
       },
    
    74 56
       {
    
    75 57
         "base": {
    
    ... ... @@ -87,13 +69,7 @@
    87 69
         "id": "e7eaba8d-6b9e-43fb-a799-b01b096c03ff",
    
    88 70
         "identifier": "startpage-onion",
    
    89 71
         "recordType": "engine",
    
    90
    -    "variants": [
    
    91
    -      {
    
    92
    -        "environment": {
    
    93
    -          "allRegionsAndLocales": true
    
    94
    -        }
    
    95
    -      }
    
    96
    -    ]
    
    72
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    97 73
       },
    
    98 74
       {
    
    99 75
         "base": {
    
    ... ... @@ -111,13 +87,7 @@
    111 87
         "id": "7f6d23c2-191e-483e-af3a-ce6451e3a8dd",
    
    112 88
         "identifier": "wikipedia",
    
    113 89
         "recordType": "engine",
    
    114
    -    "variants": [
    
    115
    -      {
    
    116
    -        "environment": {
    
    117
    -          "allRegionsAndLocales": true
    
    118
    -        }
    
    119
    -      }
    
    120
    -    ]
    
    90
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    121 91
       },
    
    122 92
       {
    
    123 93
         "recordType": "defaultEngines",