Pier Angelo Vendrame pushed to branch tor-browser-115.5.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits: 116e6f82 by Pier Angelo Vendrame at 2023-12-06T17:04:38+00:00 fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
Bug 42283: Remove blockchair
- - - - - 4195dec5 by Pier Angelo Vendrame at 2023-12-06T17:04:38+00:00 fixup! Bug 41435: Add a Tor Browser migration function
Bug 42283: Remove blockchair
- - - - -
6 changed files:
- browser/components/BrowserGlue.sys.mjs - − browser/components/search/extensions/blockchair-onion/favicon.png - − browser/components/search/extensions/blockchair-onion/manifest.json - − browser/components/search/extensions/blockchair/favicon.png - − browser/components/search/extensions/blockchair/manifest.json - toolkit/components/search/SearchService.sys.mjs
Changes:
===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -4576,7 +4576,9 @@ BrowserGlue.prototype = { // migration to packaged locales. // Version 2: Tor Browser 13.0/13.0a1: tor-browser#41845. Also, removed some // torbutton preferences that are not used anymore. - const TBB_MIGRATION_VERSION = 2; + // Version 3: Tor Browser 13.0.7/13.5a3: Remove blockchair + // (tor-browser#42283). + const TBB_MIGRATION_VERSION = 3; const MIGRATION_PREF = "torbrowser.migration.version";
// If we decide to force updating users to pass through any version @@ -4628,6 +4630,22 @@ BrowserGlue.prototype = { } } } + if (currentVersion < 3) { + (async () => { + try { + const engine = await lazy.AddonManager.getAddonByID( + "blockchair@search.mozilla.org" + ); + await engine?.uninstall(); + } catch {} + try { + const engine = await lazy.AddonManager.getAddonByID( + "blockchair-onion@search.mozilla.org" + ); + engine?.uninstall(); + } catch {} + })(); + }
Services.prefs.setIntPref(MIGRATION_PREF, TBB_MIGRATION_VERSION); },
===================================== browser/components/search/extensions/blockchair-onion/favicon.png deleted ===================================== Binary files a/browser/components/search/extensions/blockchair-onion/favicon.png and /dev/null differ
===================================== browser/components/search/extensions/blockchair-onion/manifest.json deleted ===================================== @@ -1,26 +0,0 @@ -{ - "name": "BlockchairOnion", - "description": "Blockchair Onion", - "manifest_version": 2, - "version": "1.0", - "applications": { - "gecko": { - "id": "blockchair-onion@search.mozilla.org" - } - }, - "hidden": true, - "icons": { - "16": "favicon.png" - }, - "web_accessible_resources": [ - "favicon.png" - ], - "chrome_settings_overrides": { - "search_provider": { - "name": "BlockchairOnion", - "search_url": "http://blkchairbknpn73cfjhevhla7rkp4ed5gg2knctvv7it4lioy22defid.onion/search", - "search_form": "http://blkchairbknpn73cfjhevhla7rkp4ed5gg2knctvv7it4lioy22defid.onion/search...", - "search_url_get_params": "q={searchTerms}" - } - } -}
===================================== browser/components/search/extensions/blockchair/favicon.png deleted ===================================== Binary files a/browser/components/search/extensions/blockchair/favicon.png and /dev/null differ
===================================== browser/components/search/extensions/blockchair/manifest.json deleted ===================================== @@ -1,26 +0,0 @@ -{ - "name": "Blockchair", - "description": "Blockchair", - "manifest_version": 2, - "version": "1.0", - "applications": { - "gecko": { - "id": "blockchair@search.mozilla.org" - } - }, - "hidden": true, - "icons": { - "16": "favicon.png" - }, - "web_accessible_resources": [ - "favicon.png" - ], - "chrome_settings_overrides": { - "search_provider": { - "name": "Blockchair", - "search_url": "https://blockchair.com/search", - "search_form": "https://blockchair.com/search/?q=%7BsearchTerms%7D", - "search_url_get_params": "q={searchTerms}" - } - } -}
===================================== toolkit/components/search/SearchService.sys.mjs ===================================== @@ -2282,16 +2282,11 @@ export class SearchService { { 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: "blockchair@search.mozilla.org" }, orderHint: 70 }, - { webExtension: { id: "ddg-onion@search.mozilla.org" }, orderHint: 60 }, - { - webExtension: { id: "blockchair-onion@search.mozilla.org" }, - orderHint: 50, - }, - { webExtension: { id: "startpage@search.mozilla.org" }, orderHint: 40 }, - { webExtension: { id: "twitter@search.mozilla.org" }, orderHint: 30 }, - { webExtension: { id: "wikipedia@search.mozilla.org" }, orderHint: 20 }, - { webExtension: { id: "yahoo@search.mozilla.org" }, orderHint: 10 }, + { webExtension: { id: "ddg-onion@search.mozilla.org" }, orderHint: 70 }, + { webExtension: { id: "startpage@search.mozilla.org" }, orderHint: 60 }, + { webExtension: { id: "twitter@search.mozilla.org" }, orderHint: 50 }, + { webExtension: { id: "wikipedia@search.mozilla.org" }, orderHint: 40 }, + { webExtension: { id: "yahoo@search.mozilla.org" }, orderHint: 30 }, ];
for (let e of engines) {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/30248ab...