Minor style fix to contact.js.

This commit is contained in:
Fredrik Jonsson 2023-01-05 09:36:37 +01:00
commit 14f336f1d0

View file

@ -12,14 +12,14 @@
const action = form.getAttribute('data-protect');
const body = document.querySelector('body');
// Display the hidden form.
form.classList.remove('hidden');
function activateForm() {
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.
body.addEventListener('mousemove', () => activateForm());
// Wait for a touch move event, indicating that they are human.