From 14f336f1d0ff2e78ca36ce842afbb38454609bc7 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Thu, 5 Jan 2023 09:36:37 +0100 Subject: [PATCH] Minor style fix to contact.js. --- assets/js/contact.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.