PageSourceSearch

https://www.budujmase.pl/sklep/modules/trecconsentmode/view/js/cookies.js?v=2026100417

js budujmase.pl collected 2026-10-04 15:06:00 UTC 2,644 bytes, 84 lines download raw bytes

1var cookiebody = false;
2var cname = '_cags2024v4';
3var version = '2.2';
4var GTID = 'G-KW3K8823GR';
5
6window.dataLayer = window.dataLayer || [];
7function gtag(){dataLayer.push(arguments);}
8
9
10var pa = {
11    'ad_storage': 'granted',
12    'ad_user_data': 'granted',
13    'ad_personalization': 'granted',
14    'analytics_storage': 'granted',
15    'functionality_storage': 'granted',
16    'personalization_storage': 'granted',
17    'security_storage': 'granted',
18    // 'wait_for_update': 500,
19};
20
21function loadTpl() {
22    if($('.pop-cookiebox').length < 1){
23        $('head').append('<link rel="stylesheet" type="text/css" href="' + trecconsentmode_dir + '/cookies.css">');
24        $("body").append($("<div>").addClass('pop-cookiebox'));
25        $(".pop-cookiebox").load(trecconsentmode_dir + '/' + trecconsentmode_lang_iso + ".html");
26    }
27}
28function cookieClear(sKey) {
29    document.cookie = sKey + '=; Max-Age=0';
30}
31function cookieGet(sKey) {
32    let name = sKey + "=";
33    let decodedCookie = decodeURIComponent(document.cookie);
34    let ca = decodedCookie.split(';');
35    for(let i = 0; i <ca.length; i++) {
36      let c = ca[i];
37      while (c.charAt(0) == ' ') {
38        c = c.substring(1);
39      }
40      if (c.indexOf(name) == 0) {
41        try {
42            var ob = JSON.parse(c.substring(name.length, c.length));
43            if(ob.version && ob.version == version){
44                return ob;
45            }
46        } catch (err) {
47            console.log('Incompatible cookie version')
48        }
49        cookieClear(sKey)
50      }
51    }
52
53    document.addEventListener('DOMContentLoaded', (event) => {loadTpl();});
54    return false;
55}
56function cookieSet(sKey,sValue) {
57    sValue.version = version;
58    document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(JSON.stringify(sValue)) + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
59}
60function setconsent(up) {
61    var ob = cookieGet(cname);
62    var tp = 'default';
63    if(ob){
64        if(up)tp = 'update';
65        pa = {
66            'ad_storage': ob.ad_storage,
67            'ad_user_data': ob.ad_user_data,
68            'ad_personalization': ob.ad_personalization,
69            'analytics_storage': ob.analytics_storage,
70            'functionality_storage': 'granted',
71            'personalization_storage': ob.personalization_storage,
72            'security_storage': 'granted',
73        };
74    } else {
75        pa.wait_for_update = 500;
76    }
77    if (typeof gtag === 'function') {
78        gtag('consent', tp ,pa);
79        gtag('js', new Date());
80        gtag('config', GTID);
81    }
82}
83setconsent(false);
84document.addEventListener('DOMContentLoaded', (event) => {setconsent(true);});

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.