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

Fix website-appearance-ui-rfp.patch

This commit is contained in:
Malte Jürgens 2023-11-25 15:52:33 +01:00
parent ab94858bad
commit b463d1d4a6
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -1,6 +1,6 @@
--- a/browser/components/preferences/main.js --- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js
@@ -3713,6 +3713,7 @@ @@ -4184,6 +4184,7 @@ const AppearanceChooser = {
FORCED_COLORS_QUERY.addEventListener("change", this); FORCED_COLORS_QUERY.addEventListener("change", this);
Services.prefs.addObserver(PREF_USE_SYSTEM_COLORS, this); Services.prefs.addObserver(PREF_USE_SYSTEM_COLORS, this);
@ -8,7 +8,7 @@
Services.obs.addObserver(this, "look-and-feel-changed"); Services.obs.addObserver(this, "look-and-feel-changed");
this._update(); this._update();
}, },
@@ -3732,6 +3733,7 @@ @@ -4203,6 +4204,7 @@ const AppearanceChooser = {
destroy() { destroy() {
Services.prefs.removeObserver(PREF_USE_SYSTEM_COLORS, this); Services.prefs.removeObserver(PREF_USE_SYSTEM_COLORS, this);
@ -16,11 +16,12 @@
Services.obs.removeObserver(this, "look-and-feel-changed"); Services.obs.removeObserver(this, "look-and-feel-changed");
FORCED_COLORS_QUERY.removeEventListener("change", this); FORCED_COLORS_QUERY.removeEventListener("change", this);
}, },
@@ -3771,5 +3773,33 @@ @@ -4242,5 +4244,33 @@ const AppearanceChooser = {
(AppConstants.platform == "win" || (AppConstants.platform == "win" ||
!Services.prefs.getBoolPref(PREF_USE_SYSTEM_COLORS)); !Services.prefs.getBoolPref(PREF_USE_SYSTEM_COLORS));
this.warning.hidden = !forcingColorsAndNoColorSchemeSupport; this.warning.hidden = !forcingColorsAndNoColorSchemeSupport;
+ +
+ document.getElementById("web-appearance-rfp-warning")?.remove();
+ if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) { + if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) {
+ document.getElementById("web-appearance-chooser").style.opacity = 0.3; + document.getElementById("web-appearance-chooser").style.opacity = 0.3;
+ document.getElementById("web-appearance-chooser").style.pointerEvents = "none"; + document.getElementById("web-appearance-chooser").style.pointerEvents = "none";
@ -44,7 +45,6 @@
+ infoBox.appendChild(learnMore); + infoBox.appendChild(learnMore);
+ document.getElementById("webAppearanceSettings").insertBefore(infoBox, document.getElementById("webAppearanceSettings").children[2]); + document.getElementById("webAppearanceSettings").insertBefore(infoBox, document.getElementById("webAppearanceSettings").children[2]);
+ } else { + } else {
+ document.getElementById("web-appearance-rfp-warning")?.remove();
+ document.getElementById("web-appearance-chooser").style.opacity = 1; + document.getElementById("web-appearance-chooser").style.opacity = 1;
+ document.getElementById("web-appearance-chooser").style.pointerEvents = "all"; + document.getElementById("web-appearance-chooser").style.pointerEvents = "all";
+ } + }