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

improve website appearance patch

This commit is contained in:
Malte Jürgens 2022-05-04 00:06:05 +02:00
parent cf0a022db9
commit 48f4fd1aac
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -1,13 +1,35 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml --- a/browser/components/preferences/main.js
index 11e2418..14aed40 100644 +++ b/browser/components/preferences/main.js
--- a/browser/components/preferences/main.inc.xhtml @@ -806,6 +806,32 @@ var gMainPane = {
+++ b/browser/components/preferences/main.inc.xhtml () => this.readBrowserContainersCheckbox()
@@ -127,7 +127,7 @@ );
</hbox>
+ if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) {
+ document.getElementById("web-appearance-chooser").style.opacity = 0.3;
+ document.getElementById("web-appearance-chooser").style.pointerEvents = "none";
+ const infoBox = document.createElement("div");
+ infoBox.classList.add("info-box-container");
+ infoBox.style.display = "flex";
+ infoBox.style.marginBottom = "10px";
+ const icon = document.createElement("div");
+ icon.classList.add("info-icon-container");
+ infoBox.appendChild(icon);
+ const text = document.createElement("div");
+ text.innerText = "Since RPF is enabled, the website appearance chooser is disabled.";
+ infoBox.appendChild(text);
+ const learnMore = document.createElement("a");
+ learnMore.classList.add("text-link");
+ learnMore.style.marginLeft = "5px";
+ learnMore.setAttribute("is", "learn-more");
+ learnMore.href = "https://librewolf.net/docs/faq/#why-is-librewolf-forcing-light-theme";
+ learnMore.innerText = "Learn more";
+ infoBox.appendChild(learnMore);
+ const manageThemes = document.getElementById("webAppearanceSettings").lastElementChild;
+ manageThemes.remove();
+ document.getElementById("webAppearanceSettings").append(infoBox);
+ document.getElementById("webAppearanceSettings").appendChild(manageThemes);
+ }
+
this.setInitialized();
},
<!-- Website appearance -->
-<groupbox id="webAppearanceGroup" data-category="paneGeneral" hidden="true">
+<groupbox id="webAppearanceGroup" data-category="paneGeneral" hidden="true" style="display: none">
<html:h2 data-l10n-id="preferences-web-appearance-header"/>
<html:div id="webAppearanceSettings">
<description data-l10n-id="preferences-web-appearance-description"/>