thought i fixed the alertbug but idk

This commit is contained in:
dylan-fournier 2024-06-10 13:21:52 -04:00
parent 776462147a
commit f31746ae47
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,9 @@ async function alertText(text="Song Added!") {
alertbox = document.getElementById("alert");
alertbox.innerHTML = text;
await new Promise(r => setTimeout(r, alertTime*1000));
alertbox.innerHTML = ""
if (alertbox.innerHTML == text) {
alertbox.innerHTML = ""
}
}
// a lot of this is kinda waffly because i was trying to get
// it to return the right stuff and javascript is asyrcronouse (boo)