From 99c159ae313dc6e791ae82cf937a0e29f110d97c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 27 Jan 2026 09:41:25 -0800 Subject: skip captcha for tor --- src/routes/(static)/support/+page.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/routes/(static)/support') diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte index 09959174..620ed018 100644 --- a/src/routes/(static)/support/+page.svelte +++ b/src/routes/(static)/support/+page.svelte @@ -15,9 +15,21 @@ let message = $state(); let sent = $state(); let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY; + let isTor = $derived(browser && location.hostname.endsWith(".onion")); let submit = (e) => { e.preventDefault(); + if (isTor) { + post("/post/email", { + username: user?.username || `${username} (unverified)`, + email, + message, + token: "", + }) + .then(() => (sent = true)) + .catch(() => fail("problem submitting")); + return; + } grecaptcha.ready(() => { grecaptcha.execute(recaptchaSiteKey, { action: "submit" }).then((token) => post("/post/email", { @@ -50,11 +62,13 @@ }); +{#if !isTor} +{/if}
{#if sent} -- cgit v1.2.3