diff --git a/content.js b/content.js index c838b956..6ed587d0 100644 --- a/content.js +++ b/content.js @@ -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;