--- a/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js @@ -806,6 +806,29 @@ var gMainPane = { () => this.readBrowserContainersCheckbox() ); + 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.alignItems = "center"; + infoBox.style.marginTop = "10px"; + infoBox.style.marginBottom = "5px"; + const text = document.createElement("div"); + text.innerText = "This feature is disabled because ResistFingerprinting is enabled. This means LibreWolf will force web content to display in a light theme."; + infoBox.appendChild(text); + const learnMore = document.createElement("a"); + learnMore.classList.add("text-link"); + learnMore.style.marginLeft = "5px"; + learnMore.style.flexShrink = 0; + 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); + document.getElementById("webAppearanceSettings").insertBefore(infoBox, document.getElementById("webAppearanceSettings").children[2]); + } + this.setInitialized(); },