PageSourceSearch

https://billing.hostpro.ua/modules/registrars/realtimeregister/src/Assets/Js/rtrClient.js?2.9.3

js hostpro.ua collected 2026-09-24 15:19:19 UTC 9,155 bytes, 209 lines download raw bytes

1(function ($) {
2    // Controllers format: rtr.routes.<controller>.
3    rtr.routes.removeRenewButton = function () {
4        $('[href="cart.php?gid=renewals"]').hide();
5    };
6
7    $(document).ready(
8        function () {
9            // Remove language code selection when not needed
10            $('#frmConfigureDomains').find('> .row > div:contains("Language Code")').parent().each(
11                function () {
12                    let self = $(this);
13                    let domain = self.prevAll('.sub-heading').first().find('span').text();
14                    if (domain.match(/^([0-9a-z-]+\.)+([a-z-]+|xn--[a-z0-9-]+)$/) && !domain.startsWith('xn--')) {
15                        self.remove();
16                    }
17                }
18            );
19
20            if (document.getElementsByClassName('rtr-child-host-form').length > 0) {
21                let key = $('input[name="totalIPS"]').val();
22                $(document).on(
23                    'click',
24                    '.delete-ns',
25                    function (e) {
26                        e.preventDefault();
27
28                        let self = this, host = $(self).attr('data-ns');
29
30                        if (confirm("Do you want to delete host: " + host)) {
31                            $(self).closest('li').find('.spinner').addClass('active');
32                            $.post(
33                                document.location.href,
34                                {
35                                    hostAction: "delete",
36                                    hostName: host
37                                },
38                                function () {
39                                    $(self).closest('li').remove();
40                                }
41                            );
42                        }
43                    }
44                );
45
46                $(".remove-ip").click(
47                    function (e) {
48                        e.preventDefault();
49                        $(this).closest('tr').remove();
50                    }
51                );
52
53                $('.add-ip').on('click',
54                    function (e) {
55                        e.preventDefault();
56                        let total = $(this).closest('form').find('input[name="totalIPS"]').val();
57
58                        $(this).closest('form').find('input[name="totalIPS"]').val(parseInt(total)  + 1);
59
60                        if (key === 13) {
61                            return false;
62                        }
63
64                        let version = $('<select/>').attr(
65                            {
66                                name: 'ipVersion[' + total + ']',
67                                class: 'ip-version'
68                            }
69                        ), options = ['V4', 'V6'];
70
71                        for (let i = 0; i < options.length; i++) {
72                            version.append($('<option/>').attr('value', options[i]).text(options[i]));
73                        }
74
75                        let input = $('<input/>').attr(
76                            {
77                                name: 'host[' + total + ']',
78                                type: 'text',
79                                placeholder: 'Your IP address.',
80                                value: ''
81                            }
82                        );
83
84                        $(this).closest('form').find('table').find('tr:nth-child(2)').before(
85                            $('<tr>')
86                                .append(
87                                    $('<td class="ip">')
88                                        .append(input)
89                                )
90                                .append(
91                                    $('<td class="version">')
92                                        .append(version)
93                                )
94                                .append(
95                                    $('<td class="remove">')
96                                        .append('<a href="#" class="text-danger remove-ip"><i class="fas fa-trash"></i></a>')
97                                )
98                        );
99
100                        $(".remove-ip").click(
101                            function (e) {
102                                e.preventDefault();
103                                $(this).closest('tr').remove();
104                            }
105                        );
106
107                        key++;
108                    }
109                );
110            }
111
112            if (document.getElementsByClassName('rtr-dnssec-form').length > 0) {
113                $(".remove-key-data").click(
114                    function (e) {
115                        e.preventDefault();
116                        $(this).closest('tr').remove();
117                    }
118                );
119
120                $(".add-keydata").click(
121                    function (e) {
122                        e.preventDefault();
123                        let total = $(this).closest('form').find('input[name="totalDNSsec"]').val();
124
125                        $(this).closest('form').find('input[name="totalDNSsec"]').val(parseInt(total)  + 1);
126
127                        // Flags
128                        let flags = $('<select/>').attr(
129                            {
130                                name: 'flags[' + total + ']',
131                                class: 'form-control'
132                            }
133                        ), options = [{key: '256', text: '256 (ZSK)'}, {key: '257', text: '257 (KSK)'}];
134
135                        for (let i = 0; i < options.length; i++) {
136                            flags.append($('<option/>').attr('value', options[i].key).text(options[i].text));
137                        }
138
139                        let algorithms = $('<select/>').attr(
140                            {
141                                name: 'algorithm[' + total + ']',
142                                class: 'form-control'
143                            }
144                        ), algorithmsOptions = [
145                            {key: '3', text: '3 (DSA/SHA1)'},
146                            {key: '5', text: '5 (RSA/SHA-1)'},
147                            {key: '6', text: '6 (DSA-NSEC3-SHA1)'},
148                            {key: '7', text: '7 (RSASHA1-NSEC3-SHA1)'},
149                            {key: '8', text: '8 (RSA/SHA-256)'},
150                            {key: '10', text: '10 (RSA/SHA-512)'},
151                            {key: '12', text: '12 (GOST R 34.10-2001)'},
152                            {key: '13', text: '13 (ECDSA Curve P-256 with SHA-256)'},
153                            {key: '14', text: '14 (ECDSA Curve P-384 with SHA-384)'},
154                            {key: '15', text: '15 (Ed25519)'},
155                            {key: '16', text: '16 (Ed448)'},
156                            {key: '17', text: '17 (SM2 signing algorithm with SM3 hashing algorithm)'},
157                            {key: '23', text: '23 (GOST R 34.10.2012)'}
158                        ];
159
160                        for (let i = 0; i < algorithmsOptions.length; i++) {
161                            algorithms.append($('<option/>').attr('value', algorithmsOptions[i].key).text(algorithmsOptions[i].text));
162                        }
163
164                        let textarea = $('<textarea/>').attr(
165                            {
166                                name: 'publicKey[' + total + ']',
167                                type: 'text',
168                                rows: 6,
169                                class: 'form-control',
170                                placeholder: 'Public key',
171                                value: ''
172                            }
173                        );
174
175                        $(this).closest('form').find('table tbody').find('tr:nth-child(1)').before(
176                            $('<tr>')
177                                .append(
178                                    $('<td>')
179                                        .append(flags)
180                                )
181                                .append(
182                                    $('<td>')
183                                        .append('3')
184                                )
185                                .append(
186                                    $('<td>')
187                                        .append(algorithms)
188                                )
189                                .append(
190                                    $('<td>')
191                                        .append(textarea)
192                                )
193                                .append(
194                                    $('<td class="remove">')
195                                        .append('<a href="#" class="text-danger remove-key-data">
195<i class="fas fa-trash fa-fw"></i></a>')
196                                )
197                        );
198                        $(".remove-key-data").click(
199                            function (e) {
200                                e.preventDefault();
201                                $(this).closest('tr').remove();
202                            }
203                        );
204                    }
205                );
206            }
207        }
208    );
209})(jQuery);

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.