Verified Commit 9209bae9 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by ma1
Browse files

Bug 42891: Set the bundled search engine for Tor Browser.

After upstream changes between Firefox 115 and 128, we had to
completely rework the way in which we define our search engines.

This commit replaces the old "Omnibox: Add DDG, Startpage, Disconnect,
Youtube, Twitter; remove Amazon, eBay, bing".

With that commit, we customized a list of addons IDs to ship as
built-in search engines, but then upsteam moved to using only
RemoteSettings.
The configuration has many more fields, and it would be quite long to
include it in the source code. Therefore, we use some local JSON files
and load the settings from them.
parent ede877bd
Loading
Loading
Loading
Loading
+973 B
Loading image diff...
+26 −0
Original line number Diff line number Diff line
{
  "name": "DuckDuckGo (.onion)",
  "description": "Duck Duck Go Onion",
  "manifest_version": 2,
  "version": "1.0",
  "applications": {
    "gecko": {
      "id": "ddg-onion@search.mozilla.org"
    }
  },
  "hidden": true,
  "icons": {
    "16": "favicon.ico"
  },
  "web_accessible_resources": ["favicon.ico"],
  "chrome_settings_overrides": {
    "search_provider": {
      "name": "DuckDuckGo (.onion)",
      "search_url": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion",
      "search_form": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q={searchTerms}",
      "search_url_get_params": "q={searchTerms}",
      "suggest_url": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ac/",
      "suggest_url_get_params": "q={searchTerms}&type=list"
    }
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
      "name": "DuckDuckGo",
      "search_url": "https://duckduckgo.com/",
      "search_form": "https://duckduckgo.com/",
      "search_url_get_params": "t=ffab&q={searchTerms}",
      "search_url_get_params": "q={searchTerms}",
      "suggest_url": "https://ac.duckduckgo.com/ac/",
      "suggest_url_get_params": "q={searchTerms}&type=list"
    }
+569 B
Loading image diff...
+24 −0
Original line number Diff line number Diff line
{
  "name": "Startpage (.onion)",
  "description": "Startpage Onion",
  "manifest_version": 2,
  "version": "1.0",
  "applications": {
    "gecko": {
      "id": "startpage-onion@search.mozilla.org"
    }
  },
  "hidden": true,
  "icons": {
    "16": "favicon.png"
  },
  "web_accessible_resources": ["favicon.png"],
  "chrome_settings_overrides": {
    "search_provider": {
      "name": "Startpage (.onion)",
      "search_url": "http://startpagel6srwcjlue4zgq3zevrujfaow726kjytqbbjyrswwmjzcqd.onion/sp/search",
      "search_form": "http://startpagel6srwcjlue4zgq3zevrujfaow726kjytqbbjyrswwmjzcqd.onion/sp/search/",
      "search_url_post_params": "q={searchTerms}"
    }
  }
}
Loading