Lint js fix.
This commit is contained in:
parent
d8af3cd856
commit
51f594091b
1 changed files with 4 additions and 4 deletions
|
|
@ -14,21 +14,21 @@
|
||||||
const activateForm = function () {
|
const activateForm = function () {
|
||||||
form.setAttribute('action', action);
|
form.setAttribute('action', action);
|
||||||
button.removeAttribute('disabled');
|
button.removeAttribute('disabled');
|
||||||
}
|
};
|
||||||
|
|
||||||
// Display the hidden form.
|
// Display the hidden form.
|
||||||
form.classList.remove('hidden');
|
form.classList.remove('hidden');
|
||||||
|
|
||||||
// Wait for a mouse to move, indicating they are human.
|
// 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.
|
// 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.
|
// A tab or enter key pressed can also indicate they are human.
|
||||||
document.body.addEventListener('keydown', function (e) {
|
document.body.addEventListener('keydown', function (e) {
|
||||||
if ((e.key === 'Tab') || (e.key === 'Enter')) {
|
if ((e.key === 'Tab') || (e.key === 'Enter')) {
|
||||||
activateForm();
|
activateForm();
|
||||||
}
|
}
|
||||||
}, { once: true });
|
}, {once: true});
|
||||||
|
|
||||||
// Mark the form as submitted.
|
// Mark the form as submitted.
|
||||||
button.addEventListener('click', () => form.classList.add('js-submitted'));
|
button.addEventListener('click', () => form.classList.add('js-submitted'));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue