Made it finish the current animation on the submit button before hiding it.

This commit is contained in:
Ajay Ramachandran
2019-07-22 15:59:21 -04:00
parent 52ec50a132
commit 14121af900

View File

@@ -529,8 +529,14 @@ function submitSponsorTimes() {
if (response != undefined) {
if (response.statusCode == 200) {
//hide loading message
document.getElementById("submitButton").style.animation = "unset";
document.getElementById("submitButton").style.display = "none";
let submitButton = document.getElementById("submitButton");
//finish this animation
submitButton.style.animation = "rotate 1s";
//when the animation is over, hide the button
submitButton.addEventListener("animationend", function() {
submitButton.style.animation = "unset";
submitButton.style.display = "none";
});
//clear the sponsor times
let sponsorTimeKey = "sponsorTimes" + currentVideoID;