diff --git a/helpers/DATA/firefox/patch_changes/001_Remove_Android_and_iOS_promotion.patch b/helpers/DATA/firefox/patch_changes/001-Remove_Android_and_iOS_promotion.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/001_Remove_Android_and_iOS_promotion.patch
rename to helpers/DATA/firefox/patch_changes/001-Remove_Android_and_iOS_promotion.patch
diff --git a/helpers/DATA/firefox/patch_changes/002_Remove_moreFromMozilla_Focus_and_Klar.patch b/helpers/DATA/firefox/patch_changes/002-Remove_moreFromMozilla_Focus_and_Klar.patch
similarity index 99%
rename from helpers/DATA/firefox/patch_changes/002_Remove_moreFromMozilla_Focus_and_Klar.patch
rename to helpers/DATA/firefox/patch_changes/002-Remove_moreFromMozilla_Focus_and_Klar.patch
index 859ed9a..1216ca7 100644
--- a/helpers/DATA/firefox/patch_changes/002_Remove_moreFromMozilla_Focus_and_Klar.patch
+++ b/helpers/DATA/firefox/patch_changes/002-Remove_moreFromMozilla_Focus_and_Klar.patch
@@ -487,63 +487,6 @@ index bb847abd..e69de29b 100644
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-diff --git a/browser/components/preferences/moreFromMozilla.js b/browser/components/preferences/moreFromMozilla.js
-index bf97580d..31017a6f 100644
---- a/browser/components/preferences/moreFromMozilla.js
-+++ b/browser/components/preferences/moreFromMozilla.js
-@@ -81,51 +81,7 @@ var gMoreFromMozillaPane = {
-
- renderProducts() {
- const isRegionUS = Region.home.toLowerCase() === "us";
-- let products = [
-- {
-- id: "firefox-mobile",
-- title_string_id: "more-from-moz-firefox-mobile-title",
-- description_string_id: "more-from-moz-firefox-mobile-description",
-- region: "global",
-- button: {
-- id: "fxMobile",
-- type: "link",
-- label_string_id: "more-from-moz-learn-more-link",
-- actionURL: AppConstants.isChinaRepack()
-- ? "https://www.firefox.com.cn/browsers/mobile/"
-- : "https://www.mozilla.org/firefox/browsers/mobile/",
-- },
-- qrcode: {
-- title: {
-- string_id: "more-from-moz-qr-code-box-firefox-mobile-title",
-- },
-- image_src_prefix:
-- "chrome://browser/content/preferences/more-from-mozilla-qr-code",
-- button: {
-- id: "qr-code-send-email",
-- label: {
-- string_id: "more-from-moz-qr-code-box-firefox-mobile-button",
-- },
-- actionURL: AppConstants.isChinaRepack()
-- ? "https://www.firefox.com.cn/mobile/get-app/"
-- : "https://www.mozilla.org/firefox/mobile/get-app/?v=mfm",
-- },
-- },
-- },
-- {
-- id: "mozilla-monitor",
-- title_string_id: "more-from-moz-mozilla-monitor-title",
-- description_string_id: isRegionUS
-- ? "more-from-moz-mozilla-monitor-us-description"
-- : "more-from-moz-mozilla-monitor-global-description",
-- region: isRegionUS ? "us" : "global",
-- button: {
-- id: "mozillaMonitor",
-- label_string_id: "more-from-moz-mozilla-monitor-button",
-- actionURL: "https://monitor.mozilla.org/",
-- },
-- },
-- ];
-+ let products = [];
-
- if (BrowserUtils.shouldShowVPNPromo()) {
- const vpn = {
diff -Nru a/browser/components/privatebrowsing/content/assets/focus-qr-code.svg b/browser/components/privatebrowsing/content/assets/focus-qr-code.svg
--- a/browser/components/privatebrowsing/content/assets/focus-qr-code.svg 2022-05-22 09:35:55.412674110 +0000
+++ b/browser/components/privatebrowsing/content/assets/focus-qr-code.svg 1970-01-01 00:00:00.000000000 +0000
@@ -794,3 +737,60 @@ index 3888af10..1d6c606f 100644
"chrome://browser/content/asrouter/assets/fox-with-box-on-cloud.svg",
"chrome://browser/content/asrouter/assets/fox-with-devices.svg",
"chrome://browser/content/asrouter/assets/fox-with-locked-box.svg",
+diff --git a/browser/components/preferences/moreFromMozilla.js b/browser/components/preferences/moreFromMozilla.js
+index 8807b5d3..82367922 100644
+--- a/browser/components/preferences/moreFromMozilla.js
++++ b/browser/components/preferences/moreFromMozilla.js
+@@ -81,51 +81,7 @@ var gMoreFromMozillaPane = {
+
+ renderProducts() {
+ const isRegionUS = Region.home.toLowerCase() === "us";
+- let products = [
+- {
+- id: "firefox-mobile",
+- title_string_id: "more-from-moz-firefox-mobile-title",
+- description_string_id: "more-from-moz-firefox-mobile-description",
+- region: "global",
+- button: {
+- id: "fxMobile",
+- type: "link",
+- label_string_id: "more-from-moz-learn-more-link",
+- actionURL: BrowserUtils.isChinaRepack()
+- ? "https://www.firefox.com.cn/browsers/mobile/"
+- : "https://www.mozilla.org/firefox/browsers/mobile/",
+- },
+- qrcode: {
+- title: {
+- string_id: "more-from-moz-qr-code-box-firefox-mobile-title",
+- },
+- image_src_prefix:
+- "chrome://browser/content/preferences/more-from-mozilla-qr-code",
+- button: {
+- id: "qr-code-send-email",
+- label: {
+- string_id: "more-from-moz-qr-code-box-firefox-mobile-button",
+- },
+- actionURL: BrowserUtils.isChinaRepack()
+- ? "https://www.firefox.com.cn/mobile/get-app/"
+- : "https://www.mozilla.org/firefox/mobile/get-app/?v=mfm",
+- },
+- },
+- },
+- {
+- id: "mozilla-monitor",
+- title_string_id: "more-from-moz-mozilla-monitor-title",
+- description_string_id: isRegionUS
+- ? "more-from-moz-mozilla-monitor-us-description"
+- : "more-from-moz-mozilla-monitor-global-description",
+- region: isRegionUS ? "us" : "global",
+- button: {
+- id: "mozillaMonitor",
+- label_string_id: "more-from-moz-mozilla-monitor-button",
+- actionURL: "https://monitor.mozilla.org/",
+- },
+- },
+- ];
++ let products = [];
+
+ if (BrowserUtils.shouldShowVPNPromo()) {
+ const vpn = {
diff --git a/helpers/DATA/firefox/patch_changes/003_disable_sponsored_topsites_and_keep_weather_widget_static.patch b/helpers/DATA/firefox/patch_changes/003-disable_sponsored_topsites_and_keep_weather_widget_static.patch
similarity index 69%
rename from helpers/DATA/firefox/patch_changes/003_disable_sponsored_topsites_and_keep_weather_widget_static.patch
rename to helpers/DATA/firefox/patch_changes/003-disable_sponsored_topsites_and_keep_weather_widget_static.patch
index a19dfa0..6865594 100644
--- a/helpers/DATA/firefox/patch_changes/003_disable_sponsored_topsites_and_keep_weather_widget_static.patch
+++ b/helpers/DATA/firefox/patch_changes/003-disable_sponsored_topsites_and_keep_weather_widget_static.patch
@@ -1,45 +1,54 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
-index 391bc93e..df6b3f84 100644
+index 52a520fd..81cc685d 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
-@@ -1718,19 +1718,19 @@ pref("browser.topsites.component.enabled", false);
-
+@@ -1718,19 +1718,19 @@
+ pref("browser.topsites.component.enabled", false);
pref("browser.topsites.useRemoteSetting", true);
// Fetch sponsored Top Sites from Mozilla Tiles Service (Contile)
-pref("browser.topsites.contile.enabled", true);
-pref("browser.topsites.contile.endpoint", "https://contile.services.mozilla.com/v1/tiles");
+pref("browser.topsites.contile.enabled", false);
+pref("browser.topsites.contile.endpoint", "");
-
+
// Whether to enable the Share-of-Voice feature for Sponsored Topsites via Contile.
-pref("browser.topsites.contile.sov.enabled", true);
+pref("browser.topsites.contile.sov.enabled", false);
-
+
// The base URL for the Quick Suggest anonymizing proxy. To make a request to
// the proxy, include a campaign ID in the path.
-pref("browser.partnerlink.attributionURL", "https://topsites.services.mozilla.com/cid/");
-pref("browser.partnerlink.campaign.topsites", "amzn_2020_a1");
+pref("browser.partnerlink.attributionURL", "");
+pref("browser.partnerlink.campaign.topsites", "");
-
+
// Activates preloading of the new tab url.
-pref("browser.newtab.preload", true);
+pref("browser.newtab.preload", false);
-
+
+ pref("browser.preonboarding.onTrainRolloutPopulation", 0);
+
// Mozilla Ad Routing Service (MARS) unified ads service
- pref("browser.newtabpage.activity-stream.unifiedAds.tiles.enabled", false);
-@@ -1738,12 +1738,12 @@ pref("browser.newtabpage.activity-stream.unifiedAds.spocs.enabled", false);
- pref("browser.newtabpage.activity-stream.unifiedAds.endpoint", "https://ads.mozilla.org/");
-
+-pref("browser.newtabpage.activity-stream.unifiedAds.tiles.enabled", true);
+-pref("browser.newtabpage.activity-stream.unifiedAds.spocs.enabled", true);
+-pref("browser.newtabpage.activity-stream.unifiedAds.endpoint", "https://ads.mozilla.org/");
++pref("browser.newtabpage.activity-stream.unifiedAds.tiles.enabled", false);
++pref("browser.newtabpage.activity-stream.unifiedAds.spocs.enabled", false);
++pref("browser.newtabpage.activity-stream.unifiedAds.endpoint", "");
+ pref("browser.newtabpage.activity-stream.unifiedAds.adsFeed.enabled", false);
+ pref("browser.newtabpage.activity-stream.unifiedAds.adsFeed.tiles.enabled", false);
+
// Weather widget for newtab
-pref("browser.newtabpage.activity-stream.showWeather", true);
+pref("browser.newtabpage.activity-stream.showWeather", false);
pref("browser.newtabpage.activity-stream.weather.query", "");
pref("browser.newtabpage.activity-stream.weather.display", "simple");
-
+
++pref("browser.newtabpage.activity-stream.images.smart", true);
+
// enable location search for newtab weather widget
-pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", true);
+pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", false);
-
+
// List of regions that get weather by default.
- pref("browser.newtabpage.activity-stream.discoverystream.region-weather-config", "US,CA");
+ pref("browser.newtabpage.activity-stream.discoverystream.region-weather-config", "US,CA")
diff --git a/helpers/DATA/firefox/patch_changes/004_sqlite-ppc.patch b/helpers/DATA/firefox/patch_changes/004-sqlite-ppc.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/004_sqlite-ppc.patch
rename to helpers/DATA/firefox/patch_changes/004-sqlite-ppc.patch
diff --git a/helpers/DATA/firefox/patch_changes/005_apply_custom_urls.patch b/helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/005_apply_custom_urls.patch
rename to helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch
diff --git a/helpers/DATA/firefox/patch_changes/006_remova_mailto_handlers_correctly.patch b/helpers/DATA/firefox/patch_changes/006-remova_mailto_handlers_correctly.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/006_remova_mailto_handlers_correctly.patch
rename to helpers/DATA/firefox/patch_changes/006-remova_mailto_handlers_correctly.patch
diff --git a/helpers/DATA/firefox/patch_changes/007_disable_remote_settings_antifeature.patch b/helpers/DATA/firefox/patch_changes/007-disable_remote_settings_antifeature.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/007_disable_remote_settings_antifeature.patch
rename to helpers/DATA/firefox/patch_changes/007-disable_remote_settings_antifeature.patch
diff --git a/helpers/DATA/firefox/patch_changes/008_aboutRights_removal_fix.patch b/helpers/DATA/firefox/patch_changes/008-aboutRights_removal_fix.patch
similarity index 88%
rename from helpers/DATA/firefox/patch_changes/008_aboutRights_removal_fix.patch
rename to helpers/DATA/firefox/patch_changes/008-aboutRights_removal_fix.patch
index 57ffc6f..e035ce2 100644
--- a/helpers/DATA/firefox/patch_changes/008_aboutRights_removal_fix.patch
+++ b/helpers/DATA/firefox/patch_changes/008-aboutRights_removal_fix.patch
@@ -1,14 +1,14 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
-index 53e4616a..ba6a3dfb 100644
+index c6498081..a8db34ad 100644
--- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml
-@@ -137,7 +137,7 @@
+@@ -138,7 +138,7 @@
--
-+
-
+-
++
+
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
@@ -20,7 +20,7 @@ index d1fe0148..ce5d1f42 100644
"chrome://devtools/content/performance-new/aboutprofiling/index.xhtml",
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
- {"rights", "https://www.mozilla.org/about/legal/terms/firefox/",
-+ {"rights", "https://trisquel.info/es/legal",
++ {"rights", "https://trisquel.info/legal",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD},
{"robots", "chrome://browser/content/aboutRobots.xhtml",
diff --git a/helpers/DATA/firefox/patch_changes/009_remove_ubunfox_suggest_webext-ublock-origin.patch b/helpers/DATA/firefox/patch_changes/009-remove_ubunfox_suggest_webext-ublock-origin.patch
similarity index 100%
rename from helpers/DATA/firefox/patch_changes/009_remove_ubunfox_suggest_webext-ublock-origin.patch
rename to helpers/DATA/firefox/patch_changes/009-remove_ubunfox_suggest_webext-ublock-origin.patch
diff --git a/helpers/DATA/firefox/patch_changes/010-remove_theme_recommendation_and_saas_forge.patch b/helpers/DATA/firefox/patch_changes/010-remove_theme_recommendation_and_saas_forge.patch
new file mode 100644
index 0000000..dd0eb98
--- /dev/null
+++ b/helpers/DATA/firefox/patch_changes/010-remove_theme_recommendation_and_saas_forge.patch
@@ -0,0 +1,23 @@
+diff --git a/toolkit/mozapps/extensions/content/aboutaddons.html b/toolkit/mozapps/extensions/content/aboutaddons.html
+index 77702576..35cf6593 100644
+--- a/toolkit/mozapps/extensions/content/aboutaddons.html
++++ b/toolkit/mozapps/extensions/content/aboutaddons.html
+@@ -799,18 +799,6 @@
+
+
+
+-
+-
+-
+-
+-
+-
+
+
+ > browser/base/content/aboutDialog.css
+echo '#warningDesc, #communityExperimentalDesc, #communityDesc, #contributeDesc {display:none!important}' >> \
+ browser/base/content/aboutDialog.css
# Replace/remove brand name on used view(s) to avoid branding issues.
for i in $(find . -name brandings.ftl)
@@ -295,10 +301,14 @@ s|firefox-help|abrowser-help|g;
"
echo "Running batch replace operation"
-find . -type f -not -iregex '.*changelog.*' -not -iregex '.*copyright.*' -not -iregex '.*third_party/.*' -execdir /bin/sed --follow-symlinks -i "$SEDSCRIPT" '{}' ';'
+find . -type f -not -iregex '.*changelog.*' \
+ -not -iregex '.*copyright.*' -not -iregex '.*third_party/.*' \
+ -execdir /bin/sed --follow-symlinks -i "$SEDSCRIPT" '{}' ';'
echo "Replacing Firefox with Abrowser on ./l10n"
-find l10n -type f -not -iregex '.*changelog.*' -not -iregex '.*copyright.*' -execdir /bin/sed --follow-symlinks -i "s/Firefox/Abrowser/" '{}' ';'
+find l10n -type f -not -iregex '.*changelog.*' \
+ -not -iregex '.*copyright.*' \
+ -execdir /bin/sed --follow-symlinks -i "s/Firefox/Abrowser/" '{}' ';'
sed 's/Firefox/Abrowser/' -i debian/control.in \
browser/locales/en-US/chrome/overrides/appstrings.properties
@@ -328,11 +338,14 @@ cat << EOF >> toolkit/mozapps/extensions/content/extensions.css
EOF
# Hide mobile promo
-echo ".fxaMobilePromo { display: none !important; }" >> browser/themes/shared/preferences/preferences.inc.css
+echo ".fxaMobilePromo { display: none !important; }" >> \
+ browser/themes/shared/preferences/preferences.inc.css
# Hide unwanted elements on about:addons
-echo ".discopane-notice, .privacy-policy-link, #main header, #plugindeprecation-notice { display: none !important; }" >> toolkit/mozapps/extensions/content/aboutaddons.css
+echo ".discopane-notice, .privacy-policy-link, #main header, #plugindeprecation-notice { display: none !important; }" >> \
+ toolkit/mozapps/extensions/content/aboutaddons.css
# Hide warnings on unsigned extensions
-echo ".warning{display: none!important; } .addon[notification=warning]{background-image: none!important;}" >> toolkit/mozapps/extensions/content/extensions.css
+echo ".warning{display: none!important; } .addon[notification=warning]{background-image: none!important;}" >> \
+ toolkit/mozapps/extensions/content/extensions.css
# Hide extra links in about box
# about: page mods, like rights.
@@ -344,8 +357,10 @@ echo ".warning{display: none!important; } .addon[notification=warning]{backgroun
#EO about: mods.
-sed -i 's|Mozilla Project|Trisquel Project|g' browser/base/content/overrides/app-license.html
-sed -i 's|https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html|https://gitlab.trisquel.org/trisquel/package-helpers|' toolkit/content/license.html
+sed -i 's|Mozilla Project|Trisquel Project|g' \
+ browser/base/content/overrides/app-license.html
+sed -i "s|https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html|$GIT_TPH_REPO|" \
+ toolkit/content/license.html
# We went too far...
#sed -i 's/iceweasel, abrowser, icecat,/iceweasel, firefox, icecat,/g' debian/control.in
@@ -405,12 +420,12 @@ find browser/branding/ -name PrivateBrowsing_150.png | xargs -n1 cp $DATA/debug_
find l10n/ -name aboutAddons.ftl | xargs -r sed -i '/.placeholder/s|addons.mozilla.org|gnuzilla.gnu.org|g'
sed -i "s|$OLD_WEB_DEV_URL|$WEB_DEV_URL|" devtools/client/menus.js
grep -lr addons-help toolkit/mozapps/extensions/ | xargs -r sed -i 's|addons-help|abrowser-help|'
+#sed -i '/domain ==/s|addons.mozilla.org|gnuzilla.gnu.org|' netwerk/protocol/http/nsHttpChannel.cpp
+sed -i "/browser.discovery.sites/s|addons.mozilla.org|gnuzilla.gnu.org|" $BAP_FirefoxJs
+sed -i "/lightweightThemes.getMoreURL/s|https://addons.mozilla.org/.*themes||" $BAP_FirefoxJs
#Fixes by patch on source, see DATA/firefox/patches for more info.
-for patch in $(ls -v ${DATA}/patch_changes/*.patch)
-do
- patch_p1 $patch
-done
+apply_patch_changes
# Postinst script to manage profile migration and system links
echo '