1
0
Fork 0
mirror of https://github.com/Phantop/phantop.github.io synced 2025-12-08 05:05:15 +00:00

fluxwidget: use ascii chars for counts >= 10

This commit is contained in:
Phantop 2025-04-27 09:21:05 -04:00
parent b165730c03
commit 58270467c7

View file

@ -23,9 +23,10 @@ window.onload = async function run() {
const img = document.createElement("img")
const num = document.createElement("b")
img.src = `data:${icon.data}`
num.textContent = count
if (count < 10) { num.textContent = count }
else { num.textContent = String.fromCharCode(count + 55) }
container.appendChild(img)
container.appendChild(num)
link.appendChild(container)
}
}
}