PageSourceSearch

https://www.museorisorgimentotorino.it/wp-content/plugins/sg-ai-ch…/assets/js/cloudflare-turnstile.js

js museorisorgimentotorino.it collected 2026-09-24 21:53:21 UTC 2,078 bytes, 55 lines download raw bytes

1var chatRequiresTurnstile = false, loginTurnstileToken, registerTurnstileToken, chatTurnstileToken, lostpasswordTurnstileToken, loginTurnstileId, registerTurnstileId, chatTurnstileId, lostpasswordTurnstileId;
2
3function showTurnstile(selector) {
4    const turnstileEl = document.querySelector('#cloudflare-turnstile-' + selector);
5    if (turnstileEl) {
6        turnstileEl.style.display = 'flex';
7    }
8}
9
10function hideTurnstile(selector) {
11    const turnstileEl = document.querySelector('#cloudflare-turnstile-' + selector);
12    if (turnstileEl) {
13        turnstileEl.style.display = 'none';
14    }
15}
16
17function resetTurnstile(selector) {
18
19    window[selector + 'TurnstileToken'] = null;
20    turnstile.reset(window[selector + 'TurnstileId']);
21}
22
23function renderTurnstile(siteKey, selector) {
24    const turnstileEl = document.querySelector('#cloudflare-turnstile-' + selector);
25    if (!turnstileEl) {
26        return;
27    }
28    window[selector + 'TurnstileId'] = turnstile.render("#cloudflare-turnstile-" + selector, {
29        sitekey: siteKey,
30        callback: function (token) {
31            window[selector + 'TurnstileToken'] = token;
32            if (turnstileEl && turnstileEl.getAttribute('hide-after-confirm') === "true") {
33                hideTurnstile(selector);
34            }
35        },
36        'error-callback': function (errorCode) {
37            window[selector + 'TurnstileToken'] = null;
38            if (turnstileEl && turnstileEl.getAttribute('hide-after-confirm') === "true") {
39                showTurnstile(selector);
40            }
41        },
42        'expired-callback': function () {
43            window[selector + 'TurnstileToken'] = null;
44            if (turnstileEl && turnstileEl.getAttribute('hide-after-confirm') === "true") {
45                showTurnstile(selector);
46            }
47        },
48        'timeout-callback': function () {
49            window[selector + 'TurnstileToken'] = null;
50            if (turnstileEl && turnstileEl.getAttribute('hide-after-confirm') === "true") {
51                showTurnstile(selector);
52            }
53        }
54    });
55}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.