PageSourceSearch

https://www.ddhavirov.cz/userFiles/cookies/cc.js

js ddhavirov.cz collected 2026-10-09 00:52:49 UTC 6,598 bytes, 177 lines download raw bytes

1import '/userFiles/cookies/cookieconsent-umd.js';
2
3var v_ad_storage = 'denied';
4var v_ad_user_data = 'denied';
5var v_ad_personalization = 'denied';
6var v_analytics_storage = 'denied';
7
8function getCookie(name) {  
9    var dc = document.cookie;  
10    var prefix = name +"=";  
11    var begin = dc.indexOf("; " + prefix);  
12    if (begin == -1) {  
13        begin = dc.indexOf(prefix);  
14        if (begin != 0)return null;  
15    } else {  
16        begin += 2;  
17    }  
18    var end = document.cookie.indexOf(";", begin);  
19    if (end == -1) {  
20        end = dc.length;  
21    }  
22    return unescape(dc.substring(begin + prefix.length, end));  
23}
24
25function ccAnlz() {
26    var cookie = getCookie('cc_cookie');
27    if (cookie !== null) { 
28        var json = JSON.parse(cookie)
29        if (json["categories"].includes("analytics")) {
30            v_analytics_storage = 'granted';
31		}
32        if (json["categories"].includes("marketing")) {
33            v_ad_storage = 'granted';
34	        v_ad_user_data = 'granted';
35	        v_ad_personalization = 'granted';
36		}	
37   }
38}
39
40ccAnlz();
41
42window.dataLayer = window.dataLayer || [];
43function gtag(){dataLayer.push(arguments);}
44gtag('consent', 'default', {
45  'functionality_storage': 'granted',
46  'security_storage': 'granted',
47  'ad_storage': v_ad_storage,
48  'ad_user_data': v_ad_user_data,
49  'ad_personalization': v_ad_personalization,
50  'analytics_storage': v_analytics_storage,
51  'wait_for_update': 1000
52});
53dataLayer.push({
54   "event": "consent_default",
55   "functionality_storage": "granted",
56   "security_storage": "granted",
57   "ad_storage": v_ad_storage,
58   "ad_user_data": v_ad_user_data,
59   "ad_personalization": v_ad_personalization,
60   "analytics_storage": v_analytics_storage
61});
62
63
64CookieConsent.run({
65    guiOptions: {
66        consentModal: {
67            layout: "bar inline",
68            position: "bottom",
69            equalWeightButtons: false,
70            flipButtons: false
71        },
72        preferencesModal: {
73            layout: "box",
74            position: "center",
75            equalWeightButtons: false,
76            flipButtons: false
77        }
78    },
79    categories: {
80        necessary: {
81            readOnly: true
82        } //,
83        // analytics: {},
84        // marketing: {}
85    },
86    language: {
87        default: "en",
88        autoDetect: "browser",
89        translations: {
90            en: {
91                consentModal: {
92                    title: "Naše stránky používají cookie",
93                    description: "Tyto webové stránky používají pouze nezbytné soubory cookies k zajištění správného fungování.",
94                    acceptAllBtn: "Beru na vědomí",
95                    //acceptNecessaryBtn: "Odmítnout vše",
96                    showPreferencesBtn: "Spravovat preference",
97                    footer: "<a href=\"/ochrana-osobnich-udaju\">Zásady ochrany osobních údajů</a>"
98                },
99                preferencesModal: {
100                    title: "Nastavení cookies",
101                    acceptAllBtn: "Beru na vědomí",
102                    //acceptNecessaryBtn: "Odmítnout vše",
103                    savePreferencesBtn: "Uložit preference",
104                    closeIconLabel: "Zavřít",
105                    serviceCounterLabel: "Služby",
106                    sections: [
107                        {
108                            title: "Použití cookies",
109                            description: "Cookies používáme pouze k zajištění základních funkcí webu."
110                        },
111                        {
112                            title: "Nezbytné cookies <span class=\"pm__badge\">Vždy povoleno</span>",
113                            description: "Cookies, které zajišťují bezchybný provoz webových stránek. Umožňují například navigaci, vložení služby nebo produktu do objednávky, ukládání dat s ohledem na bezpečnost webu, přihlašování k webu a podobně. Nezbytné cookies nelze deaktivovat, jelikož by došlo k narušení správného fungování webu.",
114                            linkedCategory: "necessary"
115                        }/*,
116                        {
117                            title: "Analytická cookies",
118                            description: "Analytické cookies jsou informace o tom, jak návštěvníci využívají webovou stránku v průběhu návštěvy. Sbírají statistické, ne osobní informace. Veškerá data jsou anonymní, konkrétní uživatele tedy identifikovat nemůžeme. Slouží ke zlepšování výkonnosti a rychlosti webové stránky.",
119                            linkedCategory: "analytics"
120                        },
121                        {
122                            title: "Marketingová cookies",
123                            description: "Používají se ke sledování preferencí webu uživatele za účelem cílení reklamy, tj. zobrazování marketingových a reklamních sdělení (i na stránkách třetích stran), které mohou návštěvníka webu zajímat, v souladu s těmito preferencemi.",
124                            linkedCategory: "marketing" 
125                        } */
126                        
127                    ]
128                }
129            }
130        }
131    },
132	onFirstConsent: ({cookie}) => {
133        console.log('onFirstConsent fired',cookie);
134		if (CookieConsent.acceptedCategory('analytics')){
135            v_analytics_storage = 'granted';     
136        }
137		if (CookieConsent.acceptedCategory('marketing')){
138            v_ad_storage = 'granted';
139	        v_ad_user_data = 'granted';
140	        v_ad_personalization = 'granted';     
141        }
142		function gtag(){dataLayer.push(arguments);}
143			gtag('consent', 'update', {
144			'functionality_storage': 'granted',
145			'security_storage': 'granted',
146			'ad_storage': v_ad_storage,
147			'ad_user_data': v_ad_user_data,
148			'ad_personalization': v_ad_personalization,
149			'analytics_storage': v_analytics_storage,
150			//'wait_for_update': 1000
151			});
152		
153		dataLayer.push({
154            "event": "consent_updated",
155            "functionality_storage": "granted",
156            "security_storage": "granted",
157            "ad_storage": v_ad_storage,
158            "ad_user_data": v_ad_user_data,
159            "ad_personalization": v_ad_personalization,
160            "analytics_storage": v_analytics_storage
161        });
162		
163		
164        },
165
166    onConsent: ({cookie}) => {
167        //console.log('onConsent fired!', cookie);
168		//marketinglaunch();
169		
170    },
171
172    onChange: ({changedCategories, changedServices}) => {
173        //console.log('onChange fired!', changedCategories, changedServices);
174		location.reload(); 
175    }
176
177});

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.