in this little script, the if-else statement is completely missed in the while loop. When I check in the console this document.getElementById("past-queue-wrapper"
document.getElementById("past-queue-wrapper"