Format fixes for js with biome.
This commit is contained in:
parent
089a0de6e0
commit
2f6becec53
1 changed files with 28 additions and 36 deletions
|
|
@ -17,15 +17,19 @@
|
|||
form.classList.remove('hidden');
|
||||
|
||||
// Wait for a mouse to move, indicating they are human.
|
||||
document.body.addEventListener('mousemove', activateForm, {once: true});
|
||||
document.body.addEventListener('mousemove', activateForm, { once: true });
|
||||
// Wait for a touch move event, indicating that they are human.
|
||||
document.body.addEventListener('touchmove', activateForm, {once: true});
|
||||
document.body.addEventListener('touchmove', activateForm, { once: true });
|
||||
// A tab or enter key pressed can also indicate they are human.
|
||||
document.body.addEventListener('keydown', function (e) {
|
||||
if ((e.key === 'Tab') || (e.key === 'Enter')) {
|
||||
activateForm();
|
||||
}
|
||||
}, {once: true});
|
||||
document.body.addEventListener(
|
||||
'keydown',
|
||||
function (e) {
|
||||
if (e.key === 'Tab' || e.key === 'Enter') {
|
||||
activateForm();
|
||||
}
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
|
||||
// Mark the form as submitted.
|
||||
button.addEventListener('click', () => form.classList.add('js-submitted'));
|
||||
|
|
@ -42,5 +46,4 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue