PageSourceSearch

https://arriva.pl/public/js/class/coockieComm.js

js arriva.pl collected 2026-10-02 12:22:01 UTC 1,733 bytes, 66 lines download raw bytes

1var coockieComm = {
2
3    conf: {},
4    commPlacement: 'body',
5    commId: 'comm_',
6
7    init: function (conf) {
8        coockieComm.conf = conf;
9
10        if (conf.getData('commId'))
11            coockieComm.commId = conf.getData('commId');
12
13        if (conf.getData('commPlacement'))
14            coockieComm.commPlacement = conf.getData('commPlacement');
15        
16        $(function () {
17            coockieComm.loadData();
18            coockieComm.registerEvents();
19        });
20    },
21
22    loadData: function () {
23
24        if (!cms.getCookie(coockieComm.conf.getData('coockieName'))) {
25
26            $.ajax({
27
28                type: "GET",
29                url: coockieComm.conf.getData('url'),
30                cache: false,
31                async: true,
32                success: function (returnval) {
33                    try {
34                        var jobj = JSON && JSON.parse(returnval) || $.parseJSON(returnval);
35
36                        if (jobj.status === "ok") {
37                            coockieComm.initContainer(jobj.html);
38                        } else {
39                            cms.logError(jobj.error);
40                        }
41
42                    } catch (e) {
43                        cms.logError(cms.lang.errorSR);
44                    }
45                }
46            });
47        }
48    },
49
50    initContainer: function (html) {
51        $(coockieComm.commPlacement).append(html);
52    },
53
54    registerEvents: function () {
55
56        $(document).on('click', '#' + coockieComm.commId + 'close', function () {
57
58            cms.setCookie(coockieComm.conf.getData('coockieName'), "1", 365);
59            $('#' + coockieComm.commId + 'info').slideUp('fast');
60            
61            return false;
62        });
63    }
64};
65
66

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.