timeout reset button text after click

This commit is contained in:
simon 2022-11-25 19:14:52 +07:00
parent 6b6a9b8b02
commit 59709c4c29
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -318,8 +318,14 @@ function buttonSuccess(button) {
} }
if (buttonSpan.innerHTML === "Subscribe") { if (buttonSpan.innerHTML === "Subscribe") {
buttonSpan.innerHTML = "Success"; buttonSpan.innerHTML = "Success";
setTimeout(() => {
buttonSpan.innerHTML = "Subscribe";
}, 2000);
} else { } else {
buttonSpan.innerHTML = checkmarkIcon; buttonSpan.innerHTML = checkmarkIcon;
setTimeout(() => {
buttonSpan.innerHTML = downloadIcon;
}, 2000);
} }
} }