fixed bestellformular
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 50s

This commit is contained in:
Andreas Hnida 2024-05-13 12:17:54 +02:00
commit 5c401526bb

View file

@ -43,8 +43,6 @@ const captchaInput = document.querySelectorAll('.captcha-input')
const captchaVerifyButton = document.querySelectorAll('.captcha-verify') const captchaVerifyButton = document.querySelectorAll('.captcha-verify')
// Form fields // Form fields
const subjectField = document.getElementById('subject')
const messageField = document.getElementById('description')
const botBadge = document.createElement('div') const botBadge = document.createElement('div')
if (debugEnabled) { if (debugEnabled) {
@ -117,9 +115,6 @@ function validateZSRNumber(form) {
function checkForBotBehavior() { function checkForBotBehavior() {
let timeSpent = (Date.now() - startTime) / 1000 let timeSpent = (Date.now() - startTime) / 1000
botDetected = botDetected =
subjectField.value === "I promised." ||
// or if messageField Has string "Hi, this is" in it
messageField.value.startsWith("Hi, this is") ||
!userInteracted || !userInteracted ||
interactionCount === 0 || interactionCount === 0 ||
timeSpent < interactionThreshold || timeSpent < interactionThreshold ||