From f0f53cb425b3d462a651e151d8f0cb8b9d02614e Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Wed, 22 Feb 2023 07:01:54 -0500 Subject: [PATCH] abrowser: Added more search engines --- helpers/DATA/firefox/process-json-files.py | 5 +++- .../searchplugins/trisquel-packages.json | 15 ++++++++++++ .../DATA/firefox/searchplugins/trisquel.json | 15 ++++++++++++ helpers/make-firefox | 24 ++++++++++--------- 4 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 helpers/DATA/firefox/searchplugins/trisquel-packages.json create mode 100644 helpers/DATA/firefox/searchplugins/trisquel.json diff --git a/helpers/DATA/firefox/process-json-files.py b/helpers/DATA/firefox/process-json-files.py index 28cd79a..9656249 100644 --- a/helpers/DATA/firefox/process-json-files.py +++ b/helpers/DATA/firefox/process-json-files.py @@ -159,7 +159,10 @@ class SearchConfig(RemoteSettings): @classmethod def should_drop_record(cls, search_engine): return search_engine['webExtension']['id'] not in ( - cls._DUCKDUCKGO_SEARCH_ENGINE_ID, 'wikipedia@search.mozilla.org') + cls._DUCKDUCKGO_SEARCH_ENGINE_ID, 'wikipedia@search.mozilla.org', + 'trisquel@search.mozilla.org', 'trisquel-packages@@search.mozilla.org', + 'wiktionary@search.mozilla.org', 'qwant@search.mozilla.org', + 'ecosia@search.mozilla.org') @classmethod def process_record(cls, search_engine): diff --git a/helpers/DATA/firefox/searchplugins/trisquel-packages.json b/helpers/DATA/firefox/searchplugins/trisquel-packages.json new file mode 100644 index 0000000..3d032f3 --- /dev/null +++ b/helpers/DATA/firefox/searchplugins/trisquel-packages.json @@ -0,0 +1,15 @@ + { + "schema": 1674147734592, + "appliesTo": [ + { + "included": { + "everywhere": true + } + } + ], + "webExtension": { + "id": "trisquel@search.mozilla.org" + }, + "id": "b5fd21a8-e369-477f-a3f2-b47a370f9030", + "last_modified": 1678 + }, diff --git a/helpers/DATA/firefox/searchplugins/trisquel.json b/helpers/DATA/firefox/searchplugins/trisquel.json new file mode 100644 index 0000000..5f093ba --- /dev/null +++ b/helpers/DATA/firefox/searchplugins/trisquel.json @@ -0,0 +1,15 @@ + { + "schema": 1674147734535, + "appliesTo": [ + { + "included": { + "everywhere": true + } + } + ], + "webExtension": { + "id": "trisquel@search.mozilla.org" + }, + "id": "b99ed276-9557-4492-8bbb-d59826381893", + "last_modified": 1678 + }, diff --git a/helpers/make-firefox b/helpers/make-firefox index fa16c9c..064610e 100644 --- a/helpers/make-firefox +++ b/helpers/make-firefox @@ -19,7 +19,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=97 +VERSION=98 EXTERNAL='deb-src http://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu $UPSTREAM main' REPOKEY=9BDB3D89CE49EC21 @@ -194,49 +194,49 @@ cat << TOP_JSON > services/settings/dumps/main/top-sites.json }, { "url": "https://packages.trisquel.org/", - "order": 0, + "order": 1, "title": "Trisquel Packages", "id": "27a9b035-0b8b-4472-97cb-b1866aba0740", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://www.gnu.org/", - "order": 1, + "order": 2, "title": "GNU", "id": "1baee931-751c-5993-b6fe-d86fbf78f9b0", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://www.fsf.org/", - "order": 2, + "order": 3, "title": "FSF", "id": "fcc60dd8-4d97-5aca-8e5d-784652c75818", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://directory.fsf.org/", - "order": 3, + "order": 4, "title": "FSF Directory", "id": "abe5bfb2-9487-5697-9f27-e0b782dfe006", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://libreplanet.org/", - "order": 4, + "order": 5, "title": "LibrePlanet", "id": "e3d2cf88-a4dc-5d2e-9f9a-f3ea241d17d8", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://www.wikipedia.org/", - "order": 5, + "order": 6, "title": "Wikipedia", "id": "02c295f5-54a8-5d29-8d1f-b619216b20c0", "last_modified": $(date +%s%N | cut -b1-13) }, { "url": "https://h-node.org/", - "order": 6, + "order": 7, "title": "h-node", "id": "c426481f-8c3f-53b8-b23a-431a91a1c7b4", "last_modified": $(date +%s%N | cut -b1-13) @@ -258,6 +258,11 @@ patch --no-backup-if-mismatch -p1 < $DATA/rollback_ddg_firefox_partnership_code # disable ads, disable redirect #sed '/search/s|q=|k1=-1\&kd=-1\&ko=1\&q=|' -i browser/components/search/extensions/ddg/manifest.json +#Trisquel custom search engines +cp -a $DATA/searchplugins/* browser/components/search/extensions/ +/bin/sed "/\"data\": \[/ r $DATA/searchplugins/trisquel.json" -i ./services/settings/dumps/main/search-config.json +/bin/sed "/\"data\": \[/ r $DATA/searchplugins/trisquel-packages.json" -i ./services/settings/dumps/main/search-config.json + # Reprocess search preconfiguration dump python3 $DATA/process-json-files.py . browser/components/extensions/schemas/ @@ -338,9 +343,6 @@ rm -rf ./browser/metro ./addon-sdk/source/doc/static-files/media ./browser/theme #Trisquel custom bookmarks cp $DATA/default-bookmarks.html browser/base/content/default-bookmarks.html -#Trisquel custom search engines -cp -a $DATA/searchplugins/* browser/components/search/extensions/ - # install extensions for extension in $(ls -1 $DATA/extensions/); do cp $DATA/extensions/$extension -r debian