improved reload trigger

This commit is contained in:
gpkvt 2023-06-04 22:38:09 +02:00
parent baffda69cb
commit 2e0bc3764f
1 changed files with 1 additions and 7 deletions

View File

@ -17,14 +17,8 @@ function autoReload() {
el.addEventListener('change', checkForm, { once: true });
});
const choices = [];
function checkForm(e) {
item = e.target.id.charAt(1);
if (choices.indexOf(item) === -1) {
choices.push(item);
}
if (choices.length === 5) {
if (document.querySelectorAll('input[type="radio"]:checked').length == 5) {
countdown();
}
}