morgan pushed to branch tor-browser-115.15.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits: 15c91aa5 by Pier Angelo Vendrame at 2024-09-12T16:59:19+02:00 fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
Bug 41835: Remove Twitter, Yahoo, and YouTube.
- - - - - c5402ad1 by Pier Angelo Vendrame at 2024-09-12T16:59:20+02:00 fixup! Bug 41435: Add a Tor Browser migration function
Bug: Review default search engine options.
Migration code for removing Twitter, Yahoo, and YouTube from the local extension database.
- - - - -
8 changed files:
- browser/components/BrowserGlue.sys.mjs - − browser/components/search/extensions/twitter/favicon.ico - − browser/components/search/extensions/twitter/manifest.json - − browser/components/search/extensions/yahoo/favicon.ico - − browser/components/search/extensions/yahoo/manifest.json - − browser/components/search/extensions/youtube/favicon.ico - − browser/components/search/extensions/youtube/manifest.json - toolkit/components/search/SearchService.sys.mjs
Changes:
===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -4584,7 +4584,9 @@ BrowserGlue.prototype = { // torbutton preferences that are not used anymore. // Version 3: Tor Browser 13.0.7/13.5a3: Remove blockchair // (tor-browser#42283). - const TBB_MIGRATION_VERSION = 3; + // Version 4: Tor Browser 14.0a4 (2024-09-02), 13.5.4: Remove Twitter, Yahoo + // and YouTube search engines (tor-browser#41835). + const TBB_MIGRATION_VERSION = 4; const MIGRATION_PREF = "torbrowser.migration.version";
// If we decide to force updating users to pass through any version @@ -4636,21 +4638,26 @@ BrowserGlue.prototype = { } } } - if (currentVersion < 3) { - (async () => { + const dropAddons = async list => { + for (const id of list) { try { - const engine = await lazy.AddonManager.getAddonByID( - "blockchair@search.mozilla.org" - ); + const engine = await lazy.AddonManager.getAddonByID(id); await engine?.uninstall(); } catch {} - try { - const engine = await lazy.AddonManager.getAddonByID( - "blockchair-onion@search.mozilla.org" - ); - engine?.uninstall(); - } catch {} - })(); + } + }; + if (currentVersion < 3) { + dropAddons([ + "blockchair@search.mozilla.org", + "blockchair-onion@search.mozilla.org", + ]); + } + if (currentVersion < 4) { + dropAddons([ + "twitter@search.mozilla.org", + "yahoo@search.mozilla.org", + "youtube@search.mozilla.org", + ]); }
Services.prefs.setIntPref(MIGRATION_PREF, TBB_MIGRATION_VERSION);
===================================== browser/components/search/extensions/twitter/favicon.ico deleted ===================================== Binary files a/browser/components/search/extensions/twitter/favicon.ico and /dev/null differ
===================================== browser/components/search/extensions/twitter/manifest.json deleted ===================================== @@ -1,26 +0,0 @@ -{ - "name": "Twitter", - "description": "Realtime Twitter Search", - "manifest_version": 2, - "version": "1.0", - "applications": { - "gecko": { - "id": "twitter@search.mozilla.org" - } - }, - "hidden": true, - "icons": { - "16": "favicon.ico" - }, - "web_accessible_resources": [ - "favicon.ico" - ], - "chrome_settings_overrides": { - "search_provider": { - "name": "Twitter", - "search_url": "https://twitter.com/search", - "search_form": "https://twitter.com/search?q=%7BsearchTerms%7D&partner=Firefox&sourc...", - "search_url_get_params": "q={searchTerms}&partner=Firefox&source=desktop-search" - } - } -} \ No newline at end of file
===================================== browser/components/search/extensions/yahoo/favicon.ico deleted ===================================== Binary files a/browser/components/search/extensions/yahoo/favicon.ico and /dev/null differ
===================================== browser/components/search/extensions/yahoo/manifest.json deleted ===================================== @@ -1,28 +0,0 @@ -{ - "name": "Yahoo", - "description": "Yahoo Search", - "manifest_version": 2, - "version": "1.0", - "applications": { - "gecko": { - "id": "yahoo@search.mozilla.org" - } - }, - "hidden": true, - "icons": { - "16": "favicon.ico" - }, - "web_accessible_resources": [ - "favicon.ico" - ], - "chrome_settings_overrides": { - "search_provider": { - "name": "Yahoo", - "search_url": "https://search.yahoo.com/yhs/search", - "search_form": "https://search.yahoo.com/yhs/search?p=%7BsearchTerms%7D&ei=UTF-8&hsp...", - "search_url_get_params": "p={searchTerms}&ei=UTF-8&hspart=mozilla", - "suggest_url": "https://search.yahoo.com/sugg/ff", - "suggest_url_get_params": "output=fxjson&appid=ffd&command={searchTerms}" - } - } -}
===================================== browser/components/search/extensions/youtube/favicon.ico deleted ===================================== Binary files a/browser/components/search/extensions/youtube/favicon.ico and /dev/null differ
===================================== browser/components/search/extensions/youtube/manifest.json deleted ===================================== @@ -1,26 +0,0 @@ -{ - "name": "YouTube", - "description": "YouTube - Videos", - "manifest_version": 2, - "version": "1.0", - "applications": { - "gecko": { - "id": "youtube@search.mozilla.org" - } - }, - "hidden": true, - "icons": { - "16": "favicon.ico" - }, - "web_accessible_resources": [ - "favicon.ico" - ], - "chrome_settings_overrides": { - "search_provider": { - "name": "YouTube", - "search_url": "https://www.youtube.com/results?search_query=%7BsearchTerms%7D&search=Se...", - "search_form": "https://www.youtube.com/index", - "suggest_url": "https://suggestqueries.google.com/complete/search?output=firefox&ds=yt&a..." - } - } -} \ No newline at end of file
===================================== toolkit/components/search/SearchService.sys.mjs ===================================== @@ -2280,14 +2280,10 @@ export class SearchService { async _fetchEngineSelectorEngines() { const engines = [ { webExtension: { id: "ddg@search.mozilla.org" }, orderHint: 100 }, - { webExtension: { id: "youtube@search.mozilla.org" }, orderHint: 90 }, - { webExtension: { id: "google@search.mozilla.org" }, orderHint: 80 }, - { webExtension: { id: "ddg-onion@search.mozilla.org" }, orderHint: 70 }, - { webExtension: { id: "startpage@search.mozilla.org" }, orderHint: 60 }, - { webExtension: { id: "startpage-onion@search.mozilla.org" }, orderHint: 50 }, - { webExtension: { id: "twitter@search.mozilla.org" }, orderHint: 40 }, - { webExtension: { id: "wikipedia@search.mozilla.org" }, orderHint: 30 }, - { webExtension: { id: "yahoo@search.mozilla.org" }, orderHint: 20 }, + { webExtension: { id: "ddg-onion@search.mozilla.org" }, orderHint: 90 }, + { webExtension: { id: "startpage@search.mozilla.org" }, orderHint: 80 }, + { webExtension: { id: "startpage-onion@search.mozilla.org" }, orderHint: 70 }, + { webExtension: { id: "wikipedia@search.mozilla.org" }, orderHint: 60 }, ];
for (let e of engines) {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8eb0e1e...
tbb-commits@lists.torproject.org