0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 05:33:03 -05:00

add librewolf-prefs.patch

This commit is contained in:
Malte Jürgens 2022-10-23 11:09:51 +02:00
parent 6bf8aa0795
commit 9fbd0a1cb8
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3
3 changed files with 14 additions and 17 deletions

View file

@ -6,6 +6,7 @@ patches/disable-data-reporting-at-compile-time.patch
patches/faster-package-multi-locale.patch
patches/hide-passwordmgr.patch
patches/librewolf-pref-pane.patch
patches/librewolf-prefs.patch
patches/mozilla_dirs.patch
patches/remove_addons.patch
patches/sed-patches/allow-searchengines-non-esr.patch

View file

@ -0,0 +1,9 @@
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -21,0 +21,4 @@
+
+pref("librewolf.firefoxView.hideTabPickup", false);
+pref("librewolf.firefoxView.hideColorways", true);
+pref("librewolf.uBO.assetsBootstrapLocation, "");
+pref("librewolf.aboutMenu.checkVersion", false);
+

View file

@ -1,16 +1,3 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -777,6 +777,9 @@ pref("browser.tabs.tooltipsShowPidAndAct
pref("browser.tabs.firefox-view", true);
pref("browser.tabs.firefox-view.logLevel", "Warn");
+pref("librewolf.firefoxViewHideTabPickup", false);
+pref("librewolf.firefoxViewHideColorways", true);
+
// allow_eval_* is enabled on Firefox Desktop only at this
// point in time
pref("security.allow_eval_with_system_principal", false);
diff --git a/browser/components/customizableui/CustomizableUI.jsm b/browser/components/customizableui/CustomizableUI.jsm
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@ -72,18 +59,18 @@ diff --git a/browser/components/firefoxview/firefoxview.mjs b/browser/components
+function onPrefChange() {
+ document.getElementById("tab-pickup-container").hidden =
+ Services.prefs.getBoolPref("identity.fxaccounts.enabled") &&
+ !Services.prefs.getBoolPref("librewolf.firefoxViewHideTabPickup", false)
+ !Services.prefs.getBoolPref("librewolf.firefoxView.hideTabPickup", false)
+ ? false
+ : true;
+ document.getElementById("colorway-landmark").hidden =
+ !Services.prefs.getBoolPref("librewolf.firefoxViewHideColorways", true)
+ !Services.prefs.getBoolPref("librewolf.firefoxView.hideColorways", true)
+ ? false
+ : true;
+}
+
+[
+ "librewolf.firefoxViewHideTabPickup",
+ "librewolf.firefoxViewHideColorways",
+ "librewolf.firefoxView.hideTabPickup",
+ "librewolf.firefoxView.hideColorways",
+ "identity.fxaccounts.enabled",
+].forEach((pref) => Services.prefs.addObserver(pref, onPrefChange));
+