mirror of
https://github.com/Phantop/phantop.github.io
synced 2025-12-08 21:21:53 +00:00
fluxwidget: use ascii chars for counts >= 10
This commit is contained in:
parent
b165730c03
commit
58270467c7
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue