all repos — honk @ b4c436d48b5319ab112317ac4c4a31bc12037671

my fork of honk

fix mecount js
Anirudh Oppiliappan x@icyphox.sh
Thu, 14 Mar 2024 01:44:38 +0200
commit

b4c436d48b5319ab112317ac4c4a31bc12037671

parent

8ca7aa8cee064bf5405e4f7690257fbf0bf90a0a

1 files changed, 10 insertions(+), 1 deletions(-)

jump to
M views/honkpage.jsviews/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")