From 2587a0cb43b9dc6be0b7fc306f8f46107f35f0a0 Mon Sep 17 00:00:00 2001 From: Matthew Berman <748450+mberman84@users.noreply.github.com> Date: Thu, 25 Jun 2026 11:26:59 -0700 Subject: [PATCH] Fix protected signup readiness --- scripts/check.mjs | 18 ++++++++-- site/agents/index.html | 2 +- site/index.html | 2 +- site/learn/index.html | 2 +- site/script.js | 81 ++++++++++++++++++++++++++++++++++++------ 5 files changed, 89 insertions(+), 16 deletions(-) diff --git a/scripts/check.mjs b/scripts/check.mjs index ed52e5d..a41b403 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -126,7 +126,7 @@ assert(html.includes("Search the library")); assert(html.includes("Search by title, task, or contributor")); assert(html.includes('class="search-field"')); assert(html.includes("styles.css?v=20260623-row-background-v2")); -assert(html.includes("script.js?v=20260623-proxy-auth")); +assert(html.includes("script.js?v=20260625-form-protection")); assert(css.includes(".search-control-label")); assert(css.includes(".search-control:hover .search-field")); assert(css.includes(".search-control:focus-within .search-field")); @@ -135,7 +135,7 @@ assert.match(css, /\.loop-table td\s*\{[^}]*background:\s*transparent;[^}]*\}/); assert.equal((html.match(/data-here-now-credit/g) || []).length, 2); for (const page of [learnHtml, agentHtml]) { assert(page.includes("styles.css?v=20260623-row-background-v2")); - assert(page.includes("script.js?v=20260623-proxy-auth")); + assert(page.includes("script.js?v=20260625-form-protection")); } for (const page of [html, learnHtml, agentHtml]) { const brandPosition = page.indexOf('class="brand-lockup"'); @@ -181,6 +181,20 @@ for (const collectionConfig of [suggestions, weeklySignups]) { } assert(workerSource.includes("TURNSTILE_RATE_LIMITER.limit")); assert(workerSource.includes("https://challenges.cloudflare.com/turnstile/v0/siteverify")); +assert(browserScript.includes("function setTurnstileUnavailable")); +assert(browserScript.includes("setTurnstileReady(widget, token)")); +assert( + browserScript.includes( + "weeklyButton.disabled = !turnstileWidgets.weeklySignups.token", + ), +); +assert( + browserScript.includes( + "submitButton.disabled = !turnstileWidgets.suggestions.token", + ), +); +assert(!browserScript.includes("Complete the verification check before signing up.")); +assert(!browserScript.includes("Complete the verification check before submitting.")); assert(workerSource.includes("handleLoopRoute")); assert(workerSource.includes("handleAuthVoteRoute")); assert(browserScript.includes('document.querySelectorAll("[data-vote-controls]")')); diff --git a/site/agents/index.html b/site/agents/index.html index 9ad5ca1..ff8c9db 100644 --- a/site/agents/index.html +++ b/site/agents/index.html @@ -77,7 +77,7 @@ /> - + - + Loop Library: Repeatable AI Agent Workflows | Forward Future diff --git a/site/learn/index.html b/site/learn/index.html index 3d86639..bf24847 100644 --- a/site/learn/index.html +++ b/site/learn/index.html @@ -75,7 +75,7 @@ /> - +