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);
|
pref("browser.onboarding.enabled", false);
|
||||||
|
|
||||||
// New tab settings
|
// 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.showTopSites",true);
|
||||||
pref("browser.newtabpage.activity-stream.feeds.section.topstories",false);
|
pref("browser.newtabpage.activity-stream.feeds.section.topstories",false);
|
||||||
pref("browser.newtabpage.activity-stream.feeds.snippets",false);
|
pref("browser.newtabpage.activity-stream.feeds.snippets",false);
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,10 @@
|
||||||
# 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=73
|
VERSION=74
|
||||||
|
|
||||||
. ./config
|
. ./config
|
||||||
|
|
||||||
patch -p1 < debian/patches/partially-revert-google-search-update.patch
|
|
||||||
patch -p1 < debian/patches/no-region-overrides-for-google-search.patch
|
|
||||||
|
|
||||||
sed 's/clang-10 |//' -i debian/control.in
|
sed 's/clang-10 |//' -i debian/control.in
|
||||||
sed 's/libclang-10-dev |//' -i debian/control.in
|
sed 's/libclang-10-dev |//' -i debian/control.in
|
||||||
sed 's/llvm-10-dev |//' -i debian/control.in
|
sed 's/llvm-10-dev |//' -i debian/control.in
|
||||||
|
|
@ -89,21 +86,22 @@ sed "s/iceweasel,/iceweasel, firefox,/" -i debian/control.in
|
||||||
sed -i /ubuntu-bookmarks/d debian/patches/series
|
sed -i /ubuntu-bookmarks/d debian/patches/series
|
||||||
rm debian/patches/ubuntu-bookmarks*
|
rm debian/patches/ubuntu-bookmarks*
|
||||||
|
|
||||||
#Unbrand url codes for google and amazon
|
|
||||||
find debian/searchplugins |grep google| xargs -i /bin/sed '/ubuntu/d; /channel/d' -i {}
|
|
||||||
find debian/searchplugins |grep amazon| xargs -i /bin/sed '/canoniccom/d;' -i {}
|
|
||||||
|
|
||||||
#Disable canonical referrer on DDG
|
|
||||||
sed 's/&t=canonical//' -i debian/searchplugins/ddg.xml
|
|
||||||
|
|
||||||
# Make DuckDuckGo the default engine
|
# Make DuckDuckGo the default engine
|
||||||
rm debian/patches/no-region-overrides-for-google-search.patch debian/patches/partially-revert-google-search-update.patch
|
|
||||||
sed '/no-region-overrides-for-google-search/d; /partially-revert-google-search-update/d' -i debian/patches/series
|
|
||||||
sed '/searchDefault/s/: \".*\"/: "DuckDuckGo"/g' -i browser/components/search/extensions/list.json
|
sed '/searchDefault/s/: \".*\"/: "DuckDuckGo"/g' -i browser/components/search/extensions/list.json
|
||||||
sed '/visibleDefaultEngines/{n; s/"ddg",//; s/\"/"ddg", "/}' -i browser/components/search/extensions/list.json
|
sed '/visibleDefaultEngines/{n; s/"ddg",//; s/\"/"ddg", "/}' -i browser/components/search/extensions/list.json
|
||||||
|
sed '/searchOrder/s/"Google", "Bing"/"DuckDuckGo", "Google"/' -i browser/components/search/extensions/list.json
|
||||||
|
|
||||||
# contact link
|
# Custom DDG
|
||||||
#sed 's_https://input.mozilla.org/feedback_https://trisquel.info/contact_' -i browser/base/content/utilityOverlay.js
|
sed '/"params"/,/],/d' -i browser/components/search/extensions/ddg/manifest.json
|
||||||
|
cp browser/components/search/extensions/ddg browser/components/search/extensions/ddg-html -a
|
||||||
|
sed 's|/duckduckgo.com/|/html.duckduckgo.com/html/|' -i browser/components/search/extensions/ddg-html/manifest.json
|
||||||
|
sed 's|DuckDuckGo|DuckDuckGo (HTML)|' -i browser/components/search/extensions/ddg-html/manifest.json
|
||||||
|
sed 's|ddg@|ddg-html@|' -i browser/components/search/extensions/ddg-html/manifest.json
|
||||||
|
# disable ads, disable redirect
|
||||||
|
#sed '/search/s|q=|k1=-1\&kd=-1\&ko=1\&q=|' -i browser/components/search/extensions/ddg/manifest.json
|
||||||
|
|
||||||
|
# Reprocess search preconfiguration dump
|
||||||
|
python $DATA/reprocess-search-config.py ./services/settings/dumps/main/search-config.json
|
||||||
|
|
||||||
cat << EOF > debian/distribution.ini
|
cat << EOF > debian/distribution.ini
|
||||||
[Global]
|
[Global]
|
||||||
|
|
@ -176,23 +174,7 @@ rm -rf ./browser/metro ./addon-sdk/source/doc/static-files/media ./browser/theme
|
||||||
cp $DATA/bookmarks.html.in browser/locales/generic/profile/bookmarks.html.in
|
cp $DATA/bookmarks.html.in browser/locales/generic/profile/bookmarks.html.in
|
||||||
|
|
||||||
#Trisquel custom search engines
|
#Trisquel custom search engines
|
||||||
cp $DATA/searchplugins/*.xml debian/searchplugins/
|
cp -a $DATA/searchplugins/* browser/components/search/extensions/
|
||||||
sed '/additions/,$d' debian/config/searchplugins.conf -i
|
|
||||||
cat << EOF >> debian/config/searchplugins.conf
|
|
||||||
"additions": [
|
|
||||||
{
|
|
||||||
"name": "Trisquel",
|
|
||||||
"include_locales": [ "*" ],
|
|
||||||
"engine": "trisquel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Trisquel packages",
|
|
||||||
"include_locales": [ "*" ],
|
|
||||||
"engine": "trisquel-packages"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# install extensions
|
# install extensions
|
||||||
for extension in $(ls -1 $DATA/extensions/); do
|
for extension in $(ls -1 $DATA/extensions/); do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue