fix mecount js
Anirudh Oppiliappan x@icyphox.sh
Thu, 14 Mar 2024 01:44:38 +0200
1 files changed,
10 insertions(+),
1 deletions(-)
jump to
M
views/honkpage.js
→
views/honkpage.js
@@ -107,7 +107,6 @@
var mecount = document.getElementById("mecount") if (resp.MeCount) { mecount.innerHTML = resp.MeCount - mecount.style.width = "18px" } else { mecount.innerHTML = "" }@@ -550,6 +549,16 @@ curpagestate.arg = me.dataset.pagearg
tophid[curpagestate.name + ":" + curpagestate.arg] = me.dataset.tophid servermsgs[curpagestate.name + ":" + curpagestate.arg] = me.dataset.srvmsg + var mecount = document.getElementById("mecount") + if (mecount.innerHTML == "" ) { + mecount.style.width = "0px" + } else { + mecount.style.width = "18px" + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + mecount.style.backgroundColor = "var(--bg-page)" + mecount.style.color = "var(--fg-subtle)" + } + } var el = document.getElementById("homelink") el.onclick = pageswitcher("home", "") el = document.getElementById("atmelink")