Fixed submit button disappearing after already submitting once.

This commit is contained in:
Ajay Ramachandran
2019-08-03 20:52:09 -04:00
parent 0319c507d3
commit 809be3b2fb

View File

@@ -965,9 +965,15 @@ function sendSubmitMessage(){
//finish this animation
submitButton.style.animation = "rotate 1s";
//when the animation is over, hide the button
submitButton.addEventListener("animationend", function() {
let animationEndListener = function() {
changeStartSponsorButton(true, false);
});
submitButton.style.animation = "none";
submitButton.removeEventListener("animationend", animationEndListener);
};
submitButton.addEventListener("animationend", animationEndListener);
//clear the sponsor times
let sponsorTimeKey = "sponsorTimes" + currentVideoID;