fix: pricing paths, contact form spam guard, tracker on all pages, drop unused CDN script (cockpit #163 #164 #171)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -151,6 +151,8 @@ function initAnchorScroll() {
|
||||
/* ══════════════════════════════════════
|
||||
FORM HANDLER
|
||||
══════════════════════════════════════ */
|
||||
const formShownAt = Date.now();
|
||||
|
||||
function initForms() {
|
||||
document.querySelectorAll('.intake-form').forEach(form => {
|
||||
form.addEventListener('submit', async (e) => {
|
||||
@@ -163,6 +165,8 @@ function initForms() {
|
||||
// Collect all named fields
|
||||
const data = {};
|
||||
new FormData(form).forEach((val, key) => { data[key] = val; });
|
||||
// Spam check: how long the visitor took to fill the form (measured on their own clock)
|
||||
data.fill_ms = Date.now() - formShownAt;
|
||||
|
||||
try {
|
||||
const res = await fetch('/contact.php', {
|
||||
|
||||
Reference in New Issue
Block a user