Commit ce59b465 authored by Mike Perry's avatar Mike Perry Committed by Matthew Finkel
Browse files

Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing

eBay and Amazon don't treat Tor users very well. Accounts often get locked and
payments reversed.

Also:
Bug 16322: Update DuckDuckGo search engine

We are replacing the clearnet URL with an onion service one (thanks to a
patch by a cypherpunk) and are removing the duplicated DDG search
engine. Duplicating DDG happend due to bug 1061736 where Mozilla
included DDG itself into Firefox. Interestingly, this caused breaking
the DDG search if JavaScript is disabled as the Mozilla engine, which
gets loaded earlier, does not use the html version of the search page.
Moreover, the Mozilla engine tracked where the users were searching from
by adding a respective parameter to the search query. We got rid of that
feature as well.

Also:
This fixes bug 20809: the DuckDuckGo team has changed its server-side
code in a way that lets users with JavaScript enabled use the default
landing page while those without JavaScript available get redirected
directly to the non-JS page. We adapt the search engine URLs
accordingly.

Also fixes bug 29798 by making sure we only specify the Google search
engine we actually ship an .xml file for.

Also regression tests.
parent 61b1ed0f
......@@ -295,15 +295,20 @@ pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-
// Putting the search engine prefs into this file to fix #11236.
// Default search engine
pref("browser.search.defaultenginename", "Search");
pref("browser.search.defaultenginename", "data:text/plain,browser.search.defaultenginename=DuckDuckGo");
// Make sure we use the same search engine regardless of locale
pref("browser.search.geoSpecificDefaults", false);
// Search engine order (order displayed in the search bar dropdown)
// Somewhat surprisingly we get some random behavior if we specify more than
// two search engines as below. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=1126722 for details.
pref("browser.search.order.extra.1", "Search");
pref("browser.search.order.extra.1", "DuckDuckGo");
pref("browser.search.order.extra.2", "YouTube");
// Use old search config based on list.json
pref("browser.search.modernConfig", false);
// Enforce certificate pinning, see: https://bugs.torproject.org/16206
pref("security.cert_pinning.enforcement_level", 2);
......
{
"name": "DuckDuckGoOnion",
"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": "DuckDuckGoOnion",
"search_url": "https://3g2upl4pq6kufc4m.onion",
"search_form": "https://3g2upl4pq6kufc4m.onion/?q={searchTerms}",
"search_url_get_params": "q={searchTerms}"
}
}
}
\ No newline at end of file
......@@ -10,51 +10,19 @@
},
"hidden": true,
"icons": {
"16": "favicon.ico"
"16": "favicon.png"
},
"web_accessible_resources": [
"favicon.ico"
"favicon.png"
],
"chrome_settings_overrides": {
"search_provider": {
"name": "DuckDuckGo",
"search_url": "https://duckduckgo.com/",
"search_url": "https://duckduckgo.com",
"search_form": "https://duckduckgo.com/?q={searchTerms}",
"search_url_get_params": "q={searchTerms}",
"params": [
{
"name": "t",
"condition": "purpose",
"purpose": "contextmenu",
"value": "ffcm"
},
{
"name": "t",
"condition": "purpose",
"purpose": "keyword",
"value": "ffab"
},
{
"name": "t",
"condition": "purpose",
"purpose": "searchbar",
"value": "ffsb"
},
{
"name": "t",
"condition": "purpose",
"purpose": "homepage",
"value": "ffhp"
},
{
"name": "t",
"condition": "purpose",
"purpose": "newtab",
"value": "ffnt"
}
],
"suggest_url": "https://ac.duckduckgo.com/ac/",
"suggest_url_get_params": "q={searchTerms}&type=list"
}
}
}
\ No newline at end of file
}
{
"extensionName": {
"message": "Google"
},
"extensionDescription": {
"message": "Google Search"
},
"searchUrl": {
"message": "https://www.google.com/search"
},
"searchForm": {
"message": "https://www.google.com/search?client=firefox-b-1-d&q={searchTerms}"
},
"suggestUrl": {
"message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
},
"searchUrlGetParams": {
"message": "client=firefox-b-1-d&q={searchTerms}"
},
"channelPref": {
"message": "google_channel_us"
}
}
{
"extensionName": {
"message": "Google"
},
"extensionDescription": {
"message": "Google Search"
},
"searchUrl": {
"message": "https://www.google.com/search"
},
"searchForm": {
"message": "https://www.google.com/search?client=firefox-b-1-e&q={searchTerms}"
},
"suggestUrl": {
"message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
},
"searchUrlGetParams": {
"message": "client=firefox-b-1-e&q={searchTerms}"
},
"channelPref": {
"message": "google_channel_us"
}
}
{
"extensionName": {
"message": "Google"
},
"extensionDescription": {
"message": "Google Search"
},
"searchUrl": {
"message": "https://www.google.com/search"
},
"searchForm": {
"message": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}"
},
"suggestUrl": {
"message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
},
"searchUrlGetParams": {
"message": "client=firefox-b-d&q={searchTerms}"
},
"channelPref": {
"message": "google_channel_row"
}
}
{
"extensionName": {
"message": "Google"
},
"extensionDescription": {
"message": "Google Search"
},
"searchUrl": {
"message": "https://www.google.com/search"
},
"searchForm": {
"message": "https://www.google.com/search?client=firefox-b-e&q={searchTerms}"
},
"suggestUrl": {
"message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
},
"searchUrlGetParams": {
"message": "client=firefox-b-e&q={searchTerms}"
},
"channelPref": {
"message": "google_channel_row"
}
}
{
"extensionName": {
"message": "Google"
},
"extensionDescription": {
"message": "Google Search"
},
"searchUrl": {
"message": "https://www.google.com/search"
},
"searchForm": {
"message": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}"
},
"suggestUrl": {
"message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
},
"searchUrlGetParams": {
"message": "client=firefox-b-d&q={searchTerms}"
},
"channelPref": {
"message": "google_channel_row"
}
}
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"name": "Google",
"description": "Google Search",
"manifest_version": 2,
"version": "1.0",
"applications": {
......@@ -9,7 +9,6 @@
}
},
"hidden": true,
"default_locale": "en",
"icons": {
"16": "favicon.ico"
},
......@@ -18,18 +17,18 @@
],
"chrome_settings_overrides": {
"search_provider": {
"name": "__MSG_extensionName__",
"search_url": "__MSG_searchUrl__",
"search_form": "__MSG_searchForm__",
"suggest_url": "__MSG_suggestUrl__",
"name": "Google",
"search_url": "https://www.google.com/search",
"search_form": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}",
"suggest_url": "https://www.google.com/complete/search?client=firefox&q={searchTerms}",
"params": [
{
"name": "channel",
"condition": "pref",
"pref": "__MSG_channelPref__"
"pref": "google_channel_row"
}
],
"search_url_get_params": "__MSG_searchUrlGetParams__"
"search_url_get_params": "client=firefox-b-d&q={searchTerms}"
}
}
}
{
"default": {
"searchDefault": "Google",
"searchOrder": ["Google", "Bing"],
"searchDefault": "DuckDuckGo",
"searchOrder": ["DuckDuckGo", "YouTube", "Google"],
"visibleDefaultEngines": [
"google-b-d", "amazondotcom", "bing", "ddg", "ebay", "wikipedia"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
},
"regionOverrides": {
"US": {
"google-b-d": "google-b-1-d"
},
"CA": {
"ebay": "ebay-ca",
"ebay-fr": "ebay-ca",
"amazondotcom": "amazon-ca",
"amazon-france": "amazon-ca"
},
"AT": {
"ebay-de": "ebay-at"
},
"AU": {
"ebay": "ebay-au",
"ebay-uk": "ebay-au",
"amazondotcom": "amazon-au",
"amazon-en-GB": "amazon-au"
},
"BE": {
"ebay": "ebay-be",
"ebay-nl": "ebay-be",
"ebay-fr": "ebay-be"
},
"CH": {
"ebay": "ebay-ch",
"ebay-de": "ebay-ch",
"ebay-fr": "ebay-ch"
},
"FR": {
"amazondotcom": "amazon-france"
},
"IE": {
"ebay": "ebay-ie",
"ebay-uk": "ebay-ie"
},
"NL": {
"ebay": "ebay-nl"
},
"GB": {
"ebay": "ebay-uk",
"amazondotcom": "amazon-en-GB"
}
},
"locales": {
"en-US": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazondotcom", "bing", "ddg", "ebay", "wikipedia"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
},
"KZ": {
"visibleDefaultEngines": [
"amazondotcom", "bing", "google-b-d", "wikipedia", "ddg", "yandex-en"
],
"searchDefault": "Yandex"
},
"BY": {
"visibleDefaultEngines": [
"amazondotcom", "bing", "google-b-d", "wikipedia", "ddg", "yandex-en"
],
"searchDefault": "Yandex"
},
"RU": {
"visibleDefaultEngines": [
"amazondotcom", "bing", "google-b-d", "wikipedia", "ddg", "yandex-en"
],
"searchDefault": "Yandex"
},
"TR": {
"visibleDefaultEngines": [
"amazondotcom", "bing", "google-b-d", "wikipedia", "ddg", "yandex-en"
],
"searchDefault": "Yandex"
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-ca", "amazon-au", "yandex-en", "google", "google-b-1-e", "google-b-e"
......@@ -111,7 +45,7 @@
"ar": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-ar"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -207,7 +141,7 @@
"ca": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "diec2", "ddg", "ebay-es", "wikipedia-ca"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -234,9 +168,8 @@
},
"cs": {
"default": {
"searchOrder": ["Google", "Seznam"],
"visibleDefaultEngines": [
"google-b-d", "seznam-cz", "ddg", "heureka-cz", "mapy-cz", "wikipedia-cz"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -250,14 +183,14 @@
"da": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazon-en-GB", "ddg", "wikipedia-da"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"de": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazon-de", "bing", "ddg", "ebay-de", "ecosia", "leo_ende_de", "wikipedia-de"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -271,7 +204,7 @@
"el": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazon-en-GB", "bing", "ddg", "wikipedia-el"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -357,7 +290,7 @@
"es-AR": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazondotcom", "drae", "ddg", "mercadolibre-ar", "wikipedia-es"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -371,7 +304,7 @@
"es-ES": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "drae", "ddg", "ebay-es", "wikipedia-es"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -404,7 +337,7 @@
"fa": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazondotcom", "bing", "ddg", "wikipedia-fa"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -425,7 +358,7 @@
"fr": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazon-france", "ddg", "ebay-fr", "qwant", "wikipedia-fr"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -444,7 +377,7 @@
"ga-IE": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazon-en-GB", "ddg", "ebay-ie", "tearma", "wikipedia-ga-IE"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -479,7 +412,7 @@
"he": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "ddg", "wikipedia-he", "morfix-dic"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -507,7 +440,7 @@
"hu": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "ddg", "vatera", "wikipedia-hu"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -535,44 +468,42 @@
"id": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "ddg", "wikipedia-id"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"is": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-is"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"it": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazon-it", "ddg", "ebay-it", "wikipedia-it"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"ja-JP-macos": {
"default": {
"searchOrder": ["Google", "Yahoo! JAPAN", "Bing", "Amazon.co.jp", "楽天市場", "ヤフオク!", "教えて!goo", "Wikipedia (ja)"],
"visibleDefaultEngines": [
"google-b-d", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "wikipedia-ja", "ddg"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"ja": {
"default": {
"searchOrder": ["Google", "Yahoo! JAPAN", "Bing", "Amazon.co.jp", "楽天市場", "ヤフオク!", "教えて!goo", "Wikipedia (ja)"],
"visibleDefaultEngines": [
"google-b-d", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "wikipedia-ja", "ddg"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
"ka": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-ka"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -619,7 +550,7 @@
"ko": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "ddg", "naver-kr", "daum-kr", "wikipedia-kr"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -668,7 +599,7 @@
"mk": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-mk"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -696,7 +627,7 @@
"nb-NO": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "amazon-en-GB", "bing", "ddg", "gulesider-NO", "bok-NO", "qxl-NO", "wikipedia-NO"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
}
},
......@@ -710,7 +641,7 @@
"nl": {
"default": {
"visibleDefaultEngines": [
"google-b-d", "bing", "bolcom-nl", "ddg", "ebay-nl", "marktplaats-nl", "wikipedia-nl"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
},
"experimental-hidden": {
......@@ -743,14 +674,14 @@