diff --git a/assets/js/contact.js b/assets/js/contact.js index 2b4aaa1..020d0e7 100644 --- a/assets/js/contact.js +++ b/assets/js/contact.js @@ -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.