PageSourceSearch

https://www.shatura.com/local/app/js/template/yandex_captcha.js

js shatura.com collected 2026-10-02 04:59:18 UTC 2,515 bytes, 90 lines download raw bytes

1var __yandex_captcha = {
2    is_loading: false,
3    is_loaded: false,
4    client_key: false,
5    widgets: [],
6
7    getClientKey: function () {
8        return __yandex_captcha.client_key;
9    },
10
11    setClientKey: function (client_key) {
12        __app.log('Setting yandex captcha client key = ' + client_key);
13        __yandex_captcha.client_key = client_key;
14    },
15
16    init: function () {
17        if (!__yandex_captcha.is_loading && !__yandex_captcha.is_loaded) {
18
19            __yandex_captcha.is_loading = true;
20
21            __yandex_captcha.loadYandexCaptcha();
22        }
23    },
24
25    loadYandexCaptcha: function () {
26            const script = document.createElement("script");
27            script.src = "https://smartcaptcha.cloud.yandex.ru/captcha.js";
28            script.defer = true;
29
30            script.onload = function(){
31                __yandex_captcha.is_loading = false;
32                __yandex_captcha.is_loaded = true;
33                __app.log('YandexCaptcha is loaded');
34            };
35
36            script.onerror = function(){
37                __yandex_captcha.is_loading = false;
38                __yandex_captcha.is_loaded = false;
39                __app.warn('YandexCaptcha loading error');
40            };
41
42            document.head.appendChild(script);
43    },
44
45    bind: function (container_id) {
46        if (!__yandex_captcha.healthckeck()) {
47            return;
48        }
49
50        __app.log('binding YandexCaptcha for id=' + container_id);
51
52        __yandex_captcha.widgets[container_id] = window.smartCaptcha.render(container_id, {
53            sitekey: __yandex_captcha.getClientKey(),
54            invisible: true,
55            hideShield: true,
56            robustnessLevel: 'standard'
57        });
58    },
59
60    healthckeck: function(){
61        if (!window.smartCaptcha) {
62            __app.warn('healthckeck(). YandexCaptcha is not loaded');
63            return false;
64        }
65
66        return true;
67    },
68
69    handle: function (container_id) {
70        if (!__yandex_captcha.healthckeck()) {
71            return;
72        }
73
74        window.smartCaptcha.execute(__yandex_captcha.widgets[container_id], {
75            robustnessLevel: 'standard'
76        });
77
78        __app.log('handled YandexCaptcha for id=' + container_id);
79    },
80
81    reset: function(container_id){
82        if (!__yandex_captcha.healthckeck()) {
83            return;
84        }
85
86        window.smartCaptcha.reset(__yandex_captcha.widgets[container_id]);
87
88        __app.log('reset YandexCaptcha for id=' + container_id);
89    }
90};

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.