File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,13 @@ export function getTurnstileScript(turnstileSiteKey: string) {
55 if (!window.ui) return;
66 clearInterval(intervalId);
77
8- const authorized = window.ui.authSelectors.authorized().size > 0;
9- if (authorized) return;
8+ if (window.ui.authSelectors.authorized().size > 0) return;
109
1110 const container = document.createElement('div');
1211 container.id = 'cf-turnstile';
1312 container.style.position = 'absolute';
1413 container.style.top = '0px';
1514 container.style.right = '0px';
16- container.style.zIndex = '100000';
1715 container.style.height = '59px';
1816 container.style.display = 'flex';
1917 container.style.alignItems = 'center';
@@ -25,10 +23,9 @@ export function getTurnstileScript(turnstileSiteKey: string) {
2523 sitekey: '${ turnstileSiteKey } ',
2624 theme: 'dark',
2725 callback: async function(token) {
28- try {
29- const authorized = window.ui.authSelectors.authorized().size > 0;
30- if (authorized) return;
26+ if (window.ui.authSelectors.authorized().size > 0) return;
3127
28+ try {
3229 const res = await fetch('/v1/auth/turnstile', {
3330 method: 'POST',
3431 body: JSON.stringify({ token }),
You can’t perform that action at this time.
0 commit comments