Abrowser: changes for v79
This commit is contained in:
parent
5d6b11235d
commit
81881d89b2
7 changed files with 92 additions and 51 deletions
52
helpers/DATA/firefox/reprocess-search-config.py
Normal file
52
helpers/DATA/firefox/reprocess-search-config.py
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
# Copyright (C) 2020 Ruben Rodriguez <ruben@trisquel.info>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
data={}
|
||||
|
||||
with open(sys.argv[1]) as f:
|
||||
data=json.load(f)
|
||||
|
||||
whitelist=['ddg@search.mozilla.org','google@search.mozilla.org','wikipedia@search.mozilla.org','bing@search.mozilla.org']
|
||||
|
||||
i=0
|
||||
newdata={"data":[]}
|
||||
trisquel={}
|
||||
|
||||
for item in data["data"]:
|
||||
if item["webExtension"]["id"] in whitelist:
|
||||
item["appliesTo"][0]["included"]["everywhere"]=True
|
||||
item["appliesTo"][0]["default"]="no"
|
||||
if item["webExtension"]["id"] == 'ddg@search.mozilla.org':
|
||||
item["appliesTo"][0]["default"]="yes"
|
||||
item["appliesTo"][1]["application"]["orderHint"]=5000
|
||||
item["appliesTo"][1]["application"]["override"]=True
|
||||
del item["appliesTo"][1]["application"]["distributions"]
|
||||
del item["appliesTo"][1]["extraParams"]
|
||||
del item["extraParams"]
|
||||
newdata["data"].append(item)
|
||||
i+=1
|
||||
trisquel={u'webExtension': {u'id': u'trisquel@search.mozilla.org'}, u'appliesTo': [{u'included': {u'everywhere': True}, 'default': 'no'}, {u'override': True, u'application': {'override': True, 'orderHint': 4000}}], u'id': u'4341e834-7290-4d33-beb0-377c04a49566', u'last_modified': 1595254832054, u'telemetryId': u'trisquel', u'schema': 1594312388241}
|
||||
ddghtml={u'webExtension': {u'id': u'ddg-html@search.mozilla.org'}, u'appliesTo': [{u'included': {u'everywhere': True}, 'default': 'no'}, {u'override': True, u'application': {'override': True, 'orderHint': 3000}}], u'id': u'55bf6437-3b82-41a6-98be-09c3b53b5b4d', u'last_modified': 1595254832054, u'telemetryId': u'ddg-html', u'schema': 1594312388241}
|
||||
newdata["data"].append(trisquel)
|
||||
newdata["data"].append(ddghtml)
|
||||
|
||||
with open(sys.argv[1], 'w') as outfile:
|
||||
json.dump(newdata, outfile, indent=4)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<os:ShortName>Trisquel Packages</os:ShortName>
|
||||
<os:Description>Search packages.trisquel.info</os:Description>
|
||||
<os:InputEncoding>UTF-8</os:InputEncoding>
|
||||
<os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACi0lEQVQ4jY2T3UtTARiH92/0DxR0E10EZTeBF3VhBEqF9EEXUURUpn2AmohNS60oUrRMQ1D86ItKKz+atjmd25w5S82zlXPOqfNsc27nzOPOeboQJlakL/xuXnifi+d9Xx1bLEVZxTHhxzjsRZJXkn3dVob9gQhp+d1kFhs5rv9C6s1ufnjEjQDHhJ+bNXbOlJsprHfwyxdMAgrrHbzvcxONxXF7F6l47eRUaR+qqq4BWgwCO85+5KjeyMm7Jraf62DnhU5aDZMA3KodJByR0DSNmjdDCFML7L/Wy4IYQReNxUm52oXB7sEzG6Lb5sEx7uNgXi8pOT04JuYwO308bB3mrclNfbuTFoNAWoGJmLSCzusPcij3M6GlGJUvhzDYpymuH6Tvq5cDuX0cKzHjW1jCMxtk1DWPecRLZqkFfcPwmoNgOMrhgl5m5sJJu2UNVqZnRY7oLaSXWDlRZuFGjZ3LlVYOFpg5c6+fxVB0XeLjV07OP7LwosfFs7YxGjvGsI3Nkl5iJTW/nz3Zvey+1Mm+rA7y6uyEI9LGNWqahlOY59Ogh1HXPAA51Va2ne4gv86GazqQlPhn/fMOFCXB3qxOMu+YCASXud80RNFzC7Yx/9YAYijKrotd1LZP8OTtKG6viCSvcL16AGF6cXNATFohJbubqnffefruG+M/51FVlWaDQE3b+OYAgOyqQTKKTATEZT6YXQieAOXNIzR2Tf4N0DQNVVVZXV1FURQURcHrF8m4beTsgwFaewTKm0c4qjcy5RNJJBJJoTpN04jH40QiEUKhEKIoJuOemuFBs40rFWbuN9kYFzwEg0HC4TCSJK3/QiKRQJZlZFkmHo//N7IsI0kSiqKgaRq/AbKDgxgo7zYPAAAAAElFTkSuQmCC</os:Image>
|
||||
<SearchForm>http://packages.trisquel.info/</SearchForm>
|
||||
<os:Url type="text/html" method="GET" template="http://packages.trisquel.info/search?suite=default&section=all&arch=any&searchon=names&keywords={searchTerms}">
|
||||
</os:Url>
|
||||
</SearchPlugin>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<os:ShortName>Trisquel</os:ShortName>
|
||||
<os:Description>Trisquel GNU/Linux</os:Description>
|
||||
<os:InputEncoding>UTF-8</os:InputEncoding>
|
||||
<os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACi0lEQVQ4jY2T3UtTARiH92/0DxR0E10EZTeBF3VhBEqF9EEXUURUpn2AmohNS60oUrRMQ1D86ItKKz+atjmd25w5S82zlXPOqfNsc27nzOPOeboQJlakL/xuXnifi+d9Xx1bLEVZxTHhxzjsRZJXkn3dVob9gQhp+d1kFhs5rv9C6s1ufnjEjQDHhJ+bNXbOlJsprHfwyxdMAgrrHbzvcxONxXF7F6l47eRUaR+qqq4BWgwCO85+5KjeyMm7Jraf62DnhU5aDZMA3KodJByR0DSNmjdDCFML7L/Wy4IYQReNxUm52oXB7sEzG6Lb5sEx7uNgXi8pOT04JuYwO308bB3mrclNfbuTFoNAWoGJmLSCzusPcij3M6GlGJUvhzDYpymuH6Tvq5cDuX0cKzHjW1jCMxtk1DWPecRLZqkFfcPwmoNgOMrhgl5m5sJJu2UNVqZnRY7oLaSXWDlRZuFGjZ3LlVYOFpg5c6+fxVB0XeLjV07OP7LwosfFs7YxGjvGsI3Nkl5iJTW/nz3Zvey+1Mm+rA7y6uyEI9LGNWqahlOY59Ogh1HXPAA51Va2ne4gv86GazqQlPhn/fMOFCXB3qxOMu+YCASXud80RNFzC7Yx/9YAYijKrotd1LZP8OTtKG6viCSvcL16AGF6cXNATFohJbubqnffefruG+M/51FVlWaDQE3b+OYAgOyqQTKKTATEZT6YXQieAOXNIzR2Tf4N0DQNVVVZXV1FURQURcHrF8m4beTsgwFaewTKm0c4qjcy5RNJJBJJoTpN04jH40QiEUKhEKIoJuOemuFBs40rFWbuN9kYFzwEg0HC4TCSJK3/QiKRQJZlZFkmHo//N7IsI0kSiqKgaRq/AbKDgxgo7zYPAAAAAElFTkSuQmCC</os:Image>
|
||||
<os:Url type="text/html" method="GET" template="http://trisquel.info/search/node/{searchTerms}?page={startPage}">
|
||||
</os:Url><os:Url type="application/rss+xml" method="GET" template="http://trisquel.info/opensearch/node/{searchTerms}?page={startPage}">
|
||||
</os:Url>
|
||||
</SearchPlugin>
|
||||
BIN
helpers/DATA/firefox/searchplugins/trisquel/favicon.ico
Normal file
BIN
helpers/DATA/firefox/searchplugins/trisquel/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
25
helpers/DATA/firefox/searchplugins/trisquel/manifest.json
Normal file
25
helpers/DATA/firefox/searchplugins/trisquel/manifest.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "Trisquel",
|
||||
"description": "Search Trisquel GNU/Linux site",
|
||||
"manifest_version": 2,
|
||||
"version": "1.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "trisquel@search.mozilla.org"
|
||||
}
|
||||
},
|
||||
"hidden": true,
|
||||
"icons": {
|
||||
"16": "favicon.ico"
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
"favicon.ico"
|
||||
],
|
||||
"chrome_settings_overrides": {
|
||||
"search_provider": {
|
||||
"name": "Trisquel",
|
||||
"search_url": "https://trisquel.info/search/node/{searchTerms}",
|
||||
"search_form": "https://trisquel.info/search/node/{searchTerms}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ pref("browser.onboarding.updatetour", "performance,library,singlesearch,customiz
|
|||
pref("browser.onboarding.enabled", false);
|
||||
|
||||
// New tab settings
|
||||
pref("browser.newtabpage.activity-stream.default.sites", "https://www.trisquel.info/,https://www.gnu.org/,https://www.fsf.org/,https://libreplanet.org/,https://www.wikipedia.org/,https://www.wikinews.org/");
|
||||
pref("browser.newtabpage.activity-stream.default.sites", "https://trisquel.info/,https://www.gnu.org/,https://www.fsf.org/,https://libreplanet.org/,https://www.wikipedia.org/wiki/,https://www.wikinews.org/wiki/");
|
||||
pref("browser.newtabpage.activity-stream.showTopSites",true);
|
||||
pref("browser.newtabpage.activity-stream.feeds.section.topstories",false);
|
||||
pref("browser.newtabpage.activity-stream.feeds.snippets",false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue