diff --git a/copyparty/web/md.html b/copyparty/web/md.html index ab70cafc..f66d8f8e 100644 --- a/copyparty/web/md.html +++ b/copyparty/web/md.html @@ -135,13 +135,13 @@ var md_opt = { (function () { var l = localStorage, - drk = l.getItem('lightmode') != 1, + drk = l.lightmode != 1, btn = document.getElementById("lightswitch"), f = function (e) { if (e) { e.preventDefault(); drk = !drk; } document.documentElement.setAttribute("class", drk? "dark":"light"); btn.innerHTML = "go " + (drk ? "light":"dark"); -l.setItem('lightmode', drk? 0:1); +l.lightmode = drk? 0:1; }; btn.onclick = f; diff --git a/copyparty/web/mde.html b/copyparty/web/mde.html index 6ac9bd4f..97816e3b 100644 --- a/copyparty/web/mde.html +++ b/copyparty/web/mde.html @@ -33,11 +33,11 @@ var md_opt = { var lightswitch = (function () { var l = localStorage, - drk = l.getItem('lightmode') != 1, + drk = l.lightmode != 1, f = function (e) { if (e) drk = !drk; document.documentElement.setAttribute("class", drk? "dark":"light"); -l.setItem('lightmode', drk? 0:1); +l.lightmode = drk? 0:1; }; f(); return f; diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index c8c7d576..910b4f0b 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -80,7 +80,7 @@ π