This is largely irrelevant to your post :), but you can replace
spinner.className = "show"; // ... spinner.className = spinner.className.replace("show", "");
with
spinner.classList.add('show'); // ... spinner.classList.remove('show');
which I think makes things a little easier to read and won't interfere with any existing classes.
Very nice. Didn't know about that 😀
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is largely irrelevant to your post :), but you can replace
with
which I think makes things a little easier to read and won't interfere with any existing classes.
Very nice. Didn't know about that 😀