Skip to content

Commit

Permalink
Lint js fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Nov 11, 2023
1 parent d8af3cd commit 51f5940
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/js/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
const activateForm = function () {
form.setAttribute('action', action);
button.removeAttribute('disabled');
}
};

// Display the hidden form.
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 });
}, {once: true});

// Mark the form as submitted.
button.addEventListener('click', () => form.classList.add('js-submitted'));
Expand Down

0 comments on commit 51f5940

Please sign in to comment.