PageSourceSearch

https://lk.spacenet.ru/lbweb-client/js/codeRetry.js

js spacenet.ru collected 2026-10-07 17:36:41 UTC 2,101 bytes, 85 lines download raw bytes

1window.CodeRetry = (function() {
2    var map = {}, delay;
3
4    return {
5        delay: function(value) {
6            delay = value;
7        },
8        run: function(id) {
9            map[id].run();
10        },
11        register: function(id, step) {
12            var timer, btn, span;
13
14            btn = $('#'+id);
15            span = $('#'+id+' span');
16
17            btn.click(function() {
18                step.prev().submit();
19            });
20
21            map[step.id()] = {
22                run: function() {
23                    var sec, counter;
24
25                    if (timer) {
26                        clearInterval(timer);
27                    }
28
29                    sec = parseInt(delay, 0);
30                    counter = function() {
31                        span.text('(' + sec-- +')');
32                    };
33
34                    btn.attr('disabled', 'disabled');
35                    counter();
36
37                    timer = setInterval(function() {
38                        counter();
39
40                        if (sec < 0) {
41                            clearInterval(timer);
42                            span.text('');
43                            btn.removeAttr('disabled');
44                        }
45                    }, 1000);
46                }
47            };
48        }
49    };
50}());
51
52window.codeRetry = function(delay, onClick, id) {
53    var sec, timer;
54
55    id = id || 'codeRetryBtn';
56    sec = parseInt(delay, 0);
57    btn = $('#'+id);
58    span = $('#'+id+' span');
59    timer = setInterval(function() {
60        span.text('(' + sec-- +')');
61
62        if (sec < 0) {
63            clearInterval(timer);
64            span.text('');
65            btn.removeAttr('disabled');
66        }
67    }, 1000);
68
69    $('.popbox-close').click(function(){
70        sec = 0;
71    });
72
73    btn.click(onClick);
74};
75window.codeRetryPassword = function(delay, login, transport) {
76    codeRetry(delay, function() {
77        $.sendRestorePassData({
78            step: 1,
79            login: login,
80            transport: transport,
81            YII_CSRF_TOKEN: $('#tkn').val(),
82            url: $('#url').val()
83        });
84    });
85};

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.