enable button after 5 seconds

This commit is contained in:
iBNu Maksum 2024-11-06 13:50:22 +07:00
parent b316e4a242
commit a2347dd241
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 8 additions and 0 deletions

View File

@ -161,6 +161,10 @@
function ask(field, text){
if (confirm(text)) {
setTimeout(() => {
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
field.removeAttribute("disabled");
}, 5000);
return true;
} else {
setTimeout(() => {

View File

@ -114,6 +114,10 @@
function ask(field, text){
if (confirm(text)) {
setTimeout(() => {
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
field.removeAttribute("disabled");
}, 5000);
return true;
} else {
setTimeout(() => {