PageSourceSearch

https://cilicia.ru/local/templates/kilikia/js/favorites.js?v1790740396

js cilicia.ru collected 2026-09-30 03:53:54 UTC 1,642 bytes, 49 lines download raw bytes

1BX.ready(function() {
2    document.addEventListener('click', function (event) {
3
4        if (event.target.matches('[data-type="favorite"]')) {
5
6            event.preventDefault();
7
8            var favorite = event.target;
9
10            var product_id = favorite.getAttribute('data-id');
11
12            //var wait = BX.showWait('favorites-num-cols');
13
14            if (product_id > 0) {
15                BX.ajax({
16                    method: 'POST',
17                    dataType: 'json',
18                    url: '/local/ajax/favorite.php',
19                    data: {
20                        'AJAX' : 'Y',
21                        'PRODUCT_ID' : product_id,
22                        'ACTION': 'ADD'
23                    },
24                    onsuccess: function (arResult) {
25
26                        console.log(arResult);
27
28                        if (arResult.STATUS == 'SUCCESS') {
29                            favorite.classList.add('active');
30                        }
31                    }
32                });
33            }
34
35        }
36
37    });
38
39
40    /*if (typeof favorites == 'object') {
41        for(let dataId in favorites) {
42            if (document.querySelector('[data-id="' + favorites[dataId] + '"]')) {
43                document.querySelector('[data-id="' + favorites[dataId] + '"]').classList.add('active');
44                document.querySelector('[data-id="' + favorites[dataId] + '"]').setAttribute('title', 'Удалить из избранного');
45            }
46        }
47        document.querySelector('[data-favorites="num"]').innerHTML = Object.keys(favorites).length;
48    }*/
49});

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.