change confirm() to ask()

This commit is contained in:
iBNu Maksum
2024-11-06 13:45:36 +07:00
parent 2b7361cf6b
commit b316e4a242
58 changed files with 132 additions and 108 deletions

View File

@ -159,6 +159,18 @@
});
});
function ask(field, text){
if (confirm(text)) {
return true;
} else {
setTimeout(() => {
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
field.removeAttribute("disabled");
}, 500);
return false;
}
}
function setCookie(name, value, days) {
var expires = "";
if (days) {