abrowser: Added more search engines
This commit is contained in:
parent
593bf40d8e
commit
f0f53cb425
4 changed files with 47 additions and 12 deletions
|
|
@ -159,7 +159,10 @@ class SearchConfig(RemoteSettings):
|
||||||
@classmethod
|
@classmethod
|
||||||
def should_drop_record(cls, search_engine):
|
def should_drop_record(cls, search_engine):
|
||||||
return search_engine['webExtension']['id'] not in (
|
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
|
@classmethod
|
||||||
def process_record(cls, search_engine):
|
def process_record(cls, search_engine):
|
||||||
|
|
|
||||||
15
helpers/DATA/firefox/searchplugins/trisquel-packages.json
Normal file
15
helpers/DATA/firefox/searchplugins/trisquel-packages.json
Normal file
|
|
@ -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
|
||||||
|
},
|
||||||
15
helpers/DATA/firefox/searchplugins/trisquel.json
Normal file
15
helpers/DATA/firefox/searchplugins/trisquel.json
Normal file
|
|
@ -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
|
||||||
|
},
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# 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'
|
EXTERNAL='deb-src http://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu $UPSTREAM main'
|
||||||
REPOKEY=9BDB3D89CE49EC21
|
REPOKEY=9BDB3D89CE49EC21
|
||||||
|
|
||||||
|
|
@ -194,49 +194,49 @@ cat << TOP_JSON > services/settings/dumps/main/top-sites.json
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://packages.trisquel.org/",
|
"url": "https://packages.trisquel.org/",
|
||||||
"order": 0,
|
"order": 1,
|
||||||
"title": "Trisquel Packages",
|
"title": "Trisquel Packages",
|
||||||
"id": "27a9b035-0b8b-4472-97cb-b1866aba0740",
|
"id": "27a9b035-0b8b-4472-97cb-b1866aba0740",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://www.gnu.org/",
|
"url": "https://www.gnu.org/",
|
||||||
"order": 1,
|
"order": 2,
|
||||||
"title": "GNU",
|
"title": "GNU",
|
||||||
"id": "1baee931-751c-5993-b6fe-d86fbf78f9b0",
|
"id": "1baee931-751c-5993-b6fe-d86fbf78f9b0",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://www.fsf.org/",
|
"url": "https://www.fsf.org/",
|
||||||
"order": 2,
|
"order": 3,
|
||||||
"title": "FSF",
|
"title": "FSF",
|
||||||
"id": "fcc60dd8-4d97-5aca-8e5d-784652c75818",
|
"id": "fcc60dd8-4d97-5aca-8e5d-784652c75818",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://directory.fsf.org/",
|
"url": "https://directory.fsf.org/",
|
||||||
"order": 3,
|
"order": 4,
|
||||||
"title": "FSF Directory",
|
"title": "FSF Directory",
|
||||||
"id": "abe5bfb2-9487-5697-9f27-e0b782dfe006",
|
"id": "abe5bfb2-9487-5697-9f27-e0b782dfe006",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://libreplanet.org/",
|
"url": "https://libreplanet.org/",
|
||||||
"order": 4,
|
"order": 5,
|
||||||
"title": "LibrePlanet",
|
"title": "LibrePlanet",
|
||||||
"id": "e3d2cf88-a4dc-5d2e-9f9a-f3ea241d17d8",
|
"id": "e3d2cf88-a4dc-5d2e-9f9a-f3ea241d17d8",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://www.wikipedia.org/",
|
"url": "https://www.wikipedia.org/",
|
||||||
"order": 5,
|
"order": 6,
|
||||||
"title": "Wikipedia",
|
"title": "Wikipedia",
|
||||||
"id": "02c295f5-54a8-5d29-8d1f-b619216b20c0",
|
"id": "02c295f5-54a8-5d29-8d1f-b619216b20c0",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"last_modified": $(date +%s%N | cut -b1-13)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://h-node.org/",
|
"url": "https://h-node.org/",
|
||||||
"order": 6,
|
"order": 7,
|
||||||
"title": "h-node",
|
"title": "h-node",
|
||||||
"id": "c426481f-8c3f-53b8-b23a-431a91a1c7b4",
|
"id": "c426481f-8c3f-53b8-b23a-431a91a1c7b4",
|
||||||
"last_modified": $(date +%s%N | cut -b1-13)
|
"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
|
# disable ads, disable redirect
|
||||||
#sed '/search/s|q=|k1=-1\&kd=-1\&ko=1\&q=|' -i browser/components/search/extensions/ddg/manifest.json
|
#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
|
# Reprocess search preconfiguration dump
|
||||||
python3 $DATA/process-json-files.py . browser/components/extensions/schemas/
|
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
|
#Trisquel custom bookmarks
|
||||||
cp $DATA/default-bookmarks.html browser/base/content/default-bookmarks.html
|
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
|
# install extensions
|
||||||
for extension in $(ls -1 $DATA/extensions/); do
|
for extension in $(ls -1 $DATA/extensions/); do
|
||||||
cp $DATA/extensions/$extension -r debian
|
cp $DATA/extensions/$extension -r debian
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue