PageSourceSearch

https://kasyna-radar.pl/wp-content/plugins/k-redirects/js/keitaro-redirect.js?v=1791425306&ver=6.9.4

js kasyna-radar.pl collected 2026-10-09 17:09:58 UTC 3,156 bytes, 83 lines download raw bytes

1// Получаем страницу с которой перешел пользователь ( keyword );
2function getReffUrl() {
3    if (document.referrer != '' && document.referrer != undefined) {
4        return document.referrer;
5    } else {
6        return '';
7    }
8}
9
10// Записываем в Localstorage страницу на которую впервые зашел пользователь (custom_sub5).
11function getcustom_sub5() {
12    if (localStorage.custom_sub5 == undefined || localStorage.custom_sub5 == '') {
13        localStorage.custom_sub5 = document.location.href;
14    }
15}
16
17// Записываем в custom_sub4 внешний источник (страницу откуда перешел пользователь на сайт);
18function getcustom_sub4() {
19    if ((localStorage.custom_sub4 == undefined || localStorage.custom_sub4 == '') && document.referrer.indexOf(document.location.origin) == -1 && document.referrer != '') {
20        localStorage.custom_sub4 = getReffUrl();
21    }
22}
23
24
25// Установка новых атрибутов ссылкам
26setInterval(() => {
27    let el_a = document.getElementsByTagName('a');
28    for (var i = 0; i < el_a.length; i++) {
29        if (checkPermalinkisExist(el_a[i]) && el_a[i].dataset['keitaro_registered'] == undefined) {
30            el_a[i].setAttribute('onclick', 'redirectWindow(this); return false; ');
31            el_a[i].setAttribute('data-no-instant', '');
32            el_a[i].setAttribute('data-keitaro_registered', 'true');
33            el_a[i].setAttribute('data-keyword', document.location.href);
34            // set attributes
35            localStorage.custom_sub5 ? el_a[i].setAttribute('data-custom_sub5', localStorage['custom_sub5']) : '';
36            localStorage.custom_sub4 ? el_a[i].setAttribute('data-custom_sub4', localStorage['custom_sub4']) : '';
37        }
38    }
39}, 250)
40
41// Проверка есть ли ссылка с таким пермалинком;
42function checkPermalinkisExist(el) {
43    let isFound = false;
44    if (!keitaro_permalinks) {
45        return false;
46    }
47    keitaro_permalinks.forEach((i,d)=>{
48        if (el.href == i) {
49            isFound = true;
50        }
51    })
52    return isFound;
53}
54
55// Перенаправление на страницу с установленными параметрами.
56window.redirectWindow = (el) => {
57    var url = el.href + '?';
58    el.dataset['keyword'] ? url+= 'keyword=' + el.dataset['keyword'] : '';
59    el.dataset['custom_sub4'] ? url+= '&custom_sub4=' + el.dataset['custom_sub4'] : '';
60    el.dataset['custom_sub5'] ? url+= '&custom_sub5=' + el.dataset['custom_sub5'] : '';
61    clearLocalstorage();
62    // open in new window;
63    if (el.getAttribute('target') == '_blank') {
64        window.open(url);
65    }
66    // open in same window;
67    else {
68        document.location.href = url;
69    }
70}
71
72// Запись нужных данных в localstorage
73function writeToLocalstorage(){
74    getcustom_sub4();
75    getcustom_sub5();
76}
77// Очистка Localstorage
78function clearLocalstorage() {
79    delete (localStorage.custom_sub5);
80    delete (localStorage.custom_sub4);
81}
82
83writeToLocalstorage();

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.