From e507e1ac21c22ace2494dfff7a4c3ba4a97beac0 Mon Sep 17 00:00:00 2001 From: jamz-uk <222520099+jamz-uk@users.noreply.github.com> Date: Thu, 21 Aug 2025 02:56:16 +0100 Subject: [PATCH] repatch? --- Auto-Image.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Auto-Image.js b/Auto-Image.js index 9196147..366c1d4 100644 --- a/Auto-Image.js +++ b/Auto-Image.js @@ -1029,7 +1029,8 @@ const widgetId = window.turnstile.render(container, { sitekey, - size: 'invisible', + // Allowed sizes: compact | normal | flexible + size: 'compact', action, retry: 'auto', callback: (token) => { @@ -1045,6 +1046,14 @@ } }); this._turnstileWidgetId = widgetId; + // Manually execute after render for invisible-like behavior + try { + if (typeof window.turnstile?.execute === 'function') { + window.turnstile.execute(widgetId, { action }); + } + } catch (execErr) { + console.warn('Turnstile execute after render failed (callback may still fire):', execErr); + } } catch (e) { reject(e); }