PageSourceSearch

https://pavon.kz/assets/gz_xhr.js?=1

js pavon.kz collected 2026-10-02 10:19:07 UTC 2,227 bytes, 55 lines download raw bytes

1function onXHRClick(id, type, e) {
2    let xhr = new XMLHttpRequest();
3        xhr.open('GET', `/post/gz/${id}/${type}`);
4        xhr.setRequestHeader("X-Requested-With", "xmlhttprequest");
5        xhr.responseType = 'json';
6        xhr.send();
7        xhr.onload = function() {
8            let responseObj = xhr.response;
9            if (responseObj.result == 0) {
10                var oGZ = document.querySelectorAll("#oGZBadge");
11                oGZ.forEach(element => {setBadgeCount(element, responseObj.oGZCount);});
12
13                var cGZ = document.querySelectorAll("#cGZBadge");
14                cGZ.forEach(element => {setBadgeCount(element, responseObj.cGZCount);});
15
16                e.parentElement.parentElement.innerHTML = responseObj.menu;
17                toastr.success('Статус ГЗ обновлен', '', {timeOut: 3000})
18            } else {
19                toastr.error('Ошибка обновления статуса ГЗ у поста', '', {timeOut: 3000})
20            }
21        };
22
23        xhr.onerror = function() {
24            console.log("Запрос не удался");
25        };
26}
27
28function onTlXHRClick(id, type, e) {
29    let xhr = new XMLHttpRequest();
30        xhr.open('GET', `/post/tl/${id}/${type}`);
31        xhr.setRequestHeader("X-Requested-With", "xmlhttprequest");
32        xhr.responseType = 'json';
33        xhr.send();
34        xhr.onload = function() {
35            let responseObj = xhr.response;
36            if (responseObj.result == 0) {
37                e.parentElement.parentElement.innerHTML = responseObj.menu;
38                toastr.success('Тематическая линия у поста обновлен', '', {timeOut: 3000})
39            } else {
40                toastr.error('Ошибка обновления Тематической линии у поста', '', {timeOut: 3000})
41            }
42        };
43
44        xhr.onerror = function() {
45            console.log("Запрос не удался");
46        };
47}
48
49function setBadgeCount(element, count) {
50    if (element.innerHTML != count) {
51        element.innerText = count;
52        element.style.backgroundColor = "#fc8b01";
53        setTimeout(function(){element.style.backgroundColor = "#777";},3000)
54    }
55}

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.