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:
parent
cf0a022db9
commit
48f4fd1aac
1 changed files with 34 additions and 12 deletions
|
@ -1,13 +1,35 @@
|
|||
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
|
||||
index 11e2418..14aed40 100644
|
||||
--- a/browser/components/preferences/main.inc.xhtml
|
||||
+++ b/browser/components/preferences/main.inc.xhtml
|
||||
@@ -127,7 +127,7 @@
|
||||
</hbox>
|
||||
--- a/browser/components/preferences/main.js
|
||||
+++ b/browser/components/preferences/main.js
|
||||
@@ -806,6 +806,32 @@ 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.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"/>
|
||||
|
|
Loading…
Reference in a new issue