PageSourceSearch

https://www.0532.ua/assets/2851b084/adaptiveLikes.js?v=1789825604

js 0532.ua collected 2026-10-02 10:23:54 UTC 1,393 bytes, 43 lines download raw bytes

1var likes = {};
2likes.icon = null;
3likes.item = null;
4
5likes.click = function () {
6    $(document).on('click', '.js-btn-like', function () {
7        if (isUserAuthorized()) {
8            var $button = $(this);
9            likes.icon = $button.find('.svg-like');
10            likes.item = $button.parent('.ua-item');
11            var content_id = $button.attr('data-content_id');
12            var section = $button.attr('data-section');
13            if (likes.icon.hasClass('selected')) {
14                likes.removeLike(content_id, section);
15            } else {
16                likes.addLike(content_id, section);
17            }
18        } else {
19            likes.showAuthWindow();
20        }
21    });
22}();
23
24likes.showAuthWindow = function () {
25    showAuthWindow();
26};
27
28likes.addLike = function (content_id, section) {
29    jsonrpcWrapper('/ajax/jsonrpc', 'addLike', {'content_id': content_id, 'section': section},
30        function (data) {
31            likes.icon.addClass('selected');
32            likes.item.find('.ua-item__link').text(data.responseJSON.result);
33        });
34};
35
36likes.removeLike = function (content_id, section) {
37    jsonrpcWrapper('/ajax/jsonrpc', 'removeLike', {'content_id': content_id, 'section': section},
38        function (data) {
39            likes.icon.removeClass('selected');
40            likes.item.find('.ua-item__link').text(data.responseJSON.result);
41        });
42};
43

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.