mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-19 14:09:09 +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 != undefined) {
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
//hide loading message
|
//hide loading message
|
||||||
document.getElementById("submitButton").style.animation = "unset";
|
let submitButton = document.getElementById("submitButton");
|
||||||
document.getElementById("submitButton").style.display = "none";
|
//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
|
//clear the sponsor times
|
||||||
let sponsorTimeKey = "sponsorTimes" + currentVideoID;
|
let sponsorTimeKey = "sponsorTimes" + currentVideoID;
|
||||||
|
|||||||
Reference in New Issue
Block a user