diff options
| author | Adam Soltys <[email protected]> | 2026-01-27 09:41:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-01-27 09:41:25 -0800 |
| commit | 99c159ae313dc6e791ae82cf937a0e29f110d97c (patch) | |
| tree | aba99dd9eed65f35c109167f2274910bbc79f00a /src/routes/(static)/support | |
| parent | 8388481901dfbb83db8955947841379b2b2c2675 (diff) | |
| download | coinos-ui-99c159ae313dc6e791ae82cf937a0e29f110d97c.tar.gz coinos-ui-99c159ae313dc6e791ae82cf937a0e29f110d97c.zip | |
skip captcha for tor
Diffstat (limited to 'src/routes/(static)/support')
| -rw-r--r-- | src/routes/(static)/support/+page.svelte | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ }); </script> +{#if !isTor} <svelte:head ><script src={"https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey} ></script></svelte:head > +{/if} <div class="container max-w-lg mx-auto space-y-8 p-4 pb-20"> {#if sent} |
