edit v2.9.4-9.5 to use window.localStorage instead of document.cookie
diff --git a/fluid.js b/fluid.js
index 7510c8b..18b6bb8 100644
--- a/fluid.js
+++ b/fluid.js
@@ -115,7 +115,7 @@
if (theme !== undefined) {
if ($("#activecontextmenu").children(".btn").hasClass("active")) {$("#activecontextmenu").children(".btn").css("background-color", "#207bdf") } else {
if ($("#activecontextmenu").length) { if ($("#activecontextmenu").children().length == 2) { if ($("body").hasClass("dark")) { $("#activecontextmenu").children(".btn, i")[0].style = "background-color: var(--flex-layer3, #16181a);" } else { $("#activecontextmenu").children(".btn, i")[0].style = "background-color: var(--flex-layer3, #dddddd);" } } } }
- if (dontSave !== true) document.cookie = "fluidTheme=" + theme;
+ if (dontSave !== true) localStorage.setItem("fluidTheme", theme)
}
}
fluid.isOutlined = function() {
@@ -153,8 +153,8 @@
<div onclick="fluid.theme('midnight')" class="btn midnight"><i class="material-icons">brightness_3</i> Midnight Black</div>
`);
- if (getCookie("fluidTheme") !== "") {
- fluid.theme(getCookie("fluidTheme"), true)
+ if (window.localStorage.fluidTheme !== "") {
+ fluid.theme(window.localStorage.fluidTheme, true)
} else {
if (fluid.theme(undefined, "unsetStat") == "unset") fluid.theme("auto", true);
}