web/cobalt.js: fix celebration emoji loading

This commit is contained in:
wukko 2024-05-16 22:36:53 +06:00
parent f9ce6ba8cc
commit ee1e899b39
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -563,16 +563,9 @@ const loadCelebrationsEmoji = async() => {
let aboutButtonBackup = eid("about-footer").innerHTML;
try {
let j = await fetch(`/onDemand?blockId=1`).then(r => r.json()).catch(() => {});
if (j && j.status === "success" && j.text) {
eid("about-footer").innerHTML = eid("about-footer").innerHTML.replace(
`<img class="emoji"
draggable="false"
height="22"
width="22
alt="🐲"
src="emoji/dragon_face.svg"
loading="lazy">`,
`${aboutButtonBackup.split('> ')[0]}>`,
j.text
)
}