mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-18 05:28:32 +03:00
Made it finish the current animation on the submit button before hiding it.
This commit is contained in:
10
content.js
10
content.js
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user