PageSourceSearch

https://www.uaa.org.ua/local/templates/uaa/js/script.js?15856540202783

js uaa.org.ua collected 2026-10-02 10:50:22 UTC 2,783 bytes, 108 lines download raw bytes

1var CSRFtoken, modal, moverlay,
2showModal = function(title, body)
3{
4    if (typeof title == 'object')
5    {
6        moverlay.slideDown('fast');
7        title.slideDown('fast');
8        return;
9    }
10    modal.find('h4').html(title);
11    var mbody = modal.find('p'),
12        gcCont = mbody.find('> .gc');
13    if (body)
14    {
15        if (typeof body == 'string') {
16            mbody.html(body);
17        }
18        else if (typeof body == 'object')
19        {
20            if (gcCont[0]) {
21                grecaptcha.reset();
22            }
23            else
24            {
25                mbody.html('<div class="mt-20 gc"></div>');
26                gcCont = mbody.find('> .gc');
27                grecaptcha.render(gcCont[0], {
28                    sitekey: body.sitekey,
29                    callback: body.callback
30                });
31            }
32        }
33        mbody.show();
34    }
35    else {
36        mbody.hide();
37    }
38    moverlay.slideDown('fast');
39    modal.slideDown('fast')
40},
41hideModal = function(el)
42{
43    el.slideUp('fast', function () {
44        if ($('.js-modal:visible').length == 0) {
45            moverlay.slideUp('fast');
46        }
47    });
48},
49showError = function(responseText)
50{
51    var errCont = $('#sb_error_message');
52    if (errCont.length)
53    {
54        errCont.append('<br><br>');
55        errCont.append($(responseText).find('>div'));
56    }
57    else
58    {
59        var errCont = $(responseText);
60        if (errCont.attr('id') == 'sb_error_message') {
61            $('body').append(responseText);
62        }
63        else {
64            showModal('Помилка серверу');
65        }
66    }
67};
68
69$(function()
70{
71    CSRFtoken = $('head > meta[name="csrf_token"]').attr('content');
72    modal = $('#modal');
73    moverlay = $('#moverlay');
74    $('.popup-close').click(function () {
75        hideModal($(this).parent());
76    });
77    moverlay.click(function () {
78        hideModal($('.js-modal'));
79    });
80    $.ajaxSetup(
81    {
82        beforeSend: function(xhr)
83        {
84            if (CSRFtoken) {
85                xhr.setRequestHeader('X-CSRF-Token', CSRFtoken);
86            }
87            document.body.style.cursor = 'progress';
88        },
89        complete: function(xhr, textStatus)
90        {
91            if (typeof xhr.responseJSON == 'object' && xhr.responseJSON.debugInfo) {
92                showError(xhr.responseJSON.debugInfo);
93            }
94            document.body.style.cursor = 'auto';
95            if (xhr.responseJSON && xhr.responseJSON.reload) {
96                location.href = location.href.split('#')[0]
97            }
98
99        },
100        error: function(resp) {
101            showError(resp.responseText);
102        }
103    });
104    $.mask.definitions['~'] = "[+-]";
105    $('.dev-close').click(function() {
106        $(".develop").slideToggle('fast');
107    });
108});

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.