PageSourceSearch

https://penza-sputnik.ru/local/components/diva/rusguard.auth/templates/.default/script.js?17325592022171

js penza-sputnik.ru collected 2026-10-01 12:11:56 UTC 2,171 bytes, 64 lines download raw bytes

1$(function () {
2    $("#guard-auth-form").on('submit', function (e) {
3        console.log("this");
4        var _this = $(this);
5        //var rotateText = ["Проверяем пользователя","Синхронизируем поля","Уточняем погоду",""];
6        //var origButton = $(_this).find(".btn"); 
7        //var origButtonText = $(origButton).text();
8        var data = $(_this).serialize();
9        $(_this).find(".modal-label").html('<div class="b-progressbar"><div class="b-progressbar__fill">Подождите ~10 секунд</div></div>');
10        $(_this).find(".modal-footer").hide();
11
12        $.ajax({
13            url: $(_this).attr("action"),
14            data: data,
15            context: document.body
16        }).done(function (data) {
17            $(_this).html(data);
18        });
19
20        e.preventDefault();
21    });
22});
23
24/**
25 * Битрикс не хочет просто так взять, и авторизовать через AJAX. Хрен с ним, пусть авторизует как может. Напрямую.
26 */
27function hardAuth(login,pwd) {
28    var form = document.createElement("form");
29    form.setAttribute("method", "post");
30    form.setAttribute("action", "");
31    
32    var addField = function( key, value ){
33        var hiddenField = document.createElement("input");
34        hiddenField.setAttribute("type", "hidden");
35        hiddenField.setAttribute("name", key);
36        hiddenField.setAttribute("value", value );
37        form.appendChild(hiddenField);
38    }; 
39    
40    addField( "AUTH_FORM", "Y" ); 
41    addField( "TYPE", "AUTH" );
42    
43    addField( "USER_LOGIN", login );
44    addField( "USER_PASSWORD", pwd );
45    
46    document.body.appendChild(form);
47    form.submit();
48}
49
50function hideControlsFormAndSubmit() {
51    $("#guard-auth-form input[name='pwd']").removeAttr("required");
52    $("#guard-auth-form").submit();
53}
54
55function needClear() {
56    $("#guard-auth-form input[name='action']").val("clear");
57    hideControlsFormAndSubmit();
58    return true;
59}
60function needRestore() {
61    $("#guard-auth-form input[name='action']").val("restore");
62    hideControlsFormAndSubmit();
63    return true;
64}

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.