[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.15.0esr-13.5-1] 2 commits: fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing

morgan (@morgan) git at gitlab.torproject.org
Mon Sep 16 17:48:00 UTC 2024



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 at search.mozilla.org"
-          );
+          const engine = await lazy.AddonManager.getAddonByID(id);
           await engine?.uninstall();
         } catch {}
-        try {
-          const engine = await lazy.AddonManager.getAddonByID(
-            "blockchair-onion at search.mozilla.org"
-          );
-          engine?.uninstall();
-        } catch {}
-      })();
+      }
+    };
+    if (currentVersion < 3) {
+      dropAddons([
+        "blockchair at search.mozilla.org",
+        "blockchair-onion at search.mozilla.org",
+      ]);
+    }
+    if (currentVersion < 4) {
+      dropAddons([
+        "twitter at search.mozilla.org",
+        "yahoo at search.mozilla.org",
+        "youtube at 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 at 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={searchTerms}&partner=Firefox&source=desktop-search",
-      "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 at 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={searchTerms}&ei=UTF-8&hspart=mozilla",
-      "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 at 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={searchTerms}&search=Search",
-      "search_form": "https://www.youtube.com/index",
-      "suggest_url": "https://suggestqueries.google.com/complete/search?output=firefox&ds=yt&q={searchTerms}"
-    }
-  }
-}
\ 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 at search.mozilla.org" }, orderHint: 100 },
-      { webExtension: { id: "youtube at search.mozilla.org" }, orderHint: 90 },
-      { webExtension: { id: "google at search.mozilla.org" }, orderHint: 80 },
-      { webExtension: { id: "ddg-onion at search.mozilla.org" }, orderHint: 70 },
-      { webExtension: { id: "startpage at search.mozilla.org" }, orderHint: 60 },
-      { webExtension: { id: "startpage-onion at search.mozilla.org" }, orderHint: 50 },
-      { webExtension: { id: "twitter at search.mozilla.org" }, orderHint: 40 },
-      { webExtension: { id: "wikipedia at search.mozilla.org" }, orderHint: 30 },
-      { webExtension: { id: "yahoo at search.mozilla.org" }, orderHint: 20 },
+      { webExtension: { id: "ddg-onion at search.mozilla.org" }, orderHint: 90 },
+      { webExtension: { id: "startpage at search.mozilla.org" }, orderHint: 80 },
+      { webExtension: { id: "startpage-onion at search.mozilla.org" }, orderHint: 70 },
+      { webExtension: { id: "wikipedia at search.mozilla.org" }, orderHint: 60 },
     ];
 
     for (let e of engines) {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8eb0e1e5c4b59d74d610a9a3e81a7fe2ce56b532...c5402ad1dd8ef028c1b03e1581662e56c52ff58c

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8eb0e1e5c4b59d74d610a9a3e81a7fe2ce56b532...c5402ad1dd8ef028c1b03e1581662e56c52ff58c
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240916/2108c7d4/attachment-0001.htm>


More information about the tor-commits mailing list