PageSourceSearch

https://osmankarakaya.net/wp-content/plugins/cookieadmin/assets/js/consent.js?ver=1.1.7

js osmankarakaya.net collected 2026-09-24 14:25:01 UTC 20,872 bytes, 675 lines download raw bytes

1// This file handle the cookie banner and stuff related to that.
2
3var days = cookieadmin_policy.cookieadmin_days;
4
5if(typeof cookieadmin_is_consent === 'undefined'){
6	window.cookieadmin_is_consent = {};
7}
8var cookieadmin_allcookies = cookieadmin_policy.categorized_cookies;
9//setInterval(cookieadmin_categorize_cookies, 5000);
10
11function cookieadmin_is_obj(consentObj){
12	try{
13		return (
14			consentObj !== null &&
15			typeof consentObj === 'object' &&
16			!Array.isArray(consentObj) &&
17			Object.keys(consentObj).length > 0
18		);
19	}catch(e){
20		return false;
21	}
22}
23
24
25// function cookieadmin_cookie_interceptor(){
26
27	var originalCookieDescriptor =
28    Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') ||
29    Object.getOwnPropertyDescriptor(document, 'cookie');
30	var allowed_cookies = '';
31
32	// Override document.cookie to intercept cookie setting.
33	Object.defineProperty(document, 'cookie', {
34		configurable: true,
35		enumerable: true,
36		get: function(){
37			return originalCookieDescriptor.get.call(document);
38		},
39		set: function(val){
40
41			if (!val) return;
42
43			var separatorIndex = val.indexOf('=');
44			if(separatorIndex === -1) {
45				return;
46			}
47			
48			var cookieName = val.substring(0, separatorIndex).trim();
49			var cookieValue = val.substring(separatorIndex + 1).trim();
50
51			if(cookieName === "cookieadmin_consent"){
52				originalCookieDescriptor.set.call(document, val);
53				return;
54			}
55			
56			// Set cookies which are meant to be deleted
57			if(val.includes('expires=Thu, 01 Jan 1970') || cookieValue.startsWith("deleted;")){
58				originalCookieDescriptor.set.call(document, val);
59				return;
60			}
61
62			var cookieInfo = cookieadmin_allcookies[cookieName] || {};
63			var category = (cookieInfo.category || 'uncategorized').toLowerCase();
64			
65			// Set necessary cookies
66			if(category == "necessary"){
67				originalCookieDescriptor.set.call(document, val);
68				return;
69			}
70
71			if(cookieadmin_is_obj(cookieadmin_is_consent) || (Array.isArray(cookieadmin_policy['preload']) && cookieadmin_policy['preload'].length > 0)){
72
73				var consentAction = cookieadmin_is_consent.action;
74				
75				if(!consentAction){
76					consentAction = cookieadmin_policy['preload'].reduce((a, val) => {a[val] = ''; return a;}, {});
77				}
78
79				if(consentAction.accept || consentAction[category]){
80					originalCookieDescriptor.set.call(document, val);
81				}else{
82					
83					var pathMatch = val.match(/path=([^;]+)/i);
84					var domainMatch = val.match(/domain=([^;]+)/i);
85					var path = pathMatch ? pathMatch[1].trim() : '/';
86					var domain = domainMatch ? `domain=${domainMatch[1].trim()};` : '';
87					
88					var deleteString = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${path}; ${domain}`;
89					originalCookieDescriptor.set.call(document, deleteString.trim());
90				}
91				
92			}else{
93				(cookieadmin_allcookies[cookieName] = cookieadmin_allcookies[cookieName] || {}).string = val.trim();
94				return false;
95			}
96			
97		}
98	});
99// }
100// cookieadmin_cookie_interceptor();
101
102
103function cookieadmin_is_cookie(name){
104	
105	if(!document.cookie) return false;
106	
107	var coki = document.cookie.split(";") ;
108	
109	if(name == "all"){
110		return coki ? coki : [];
111	}
112	var nam = name + "=";
113	
114	for(var i=0; i < coki.length; i++){
115		if(coki[i].trim().indexOf(nam) == 0){
116			try {
117				var cookie_value = coki[i].trim().split("=");
118				if(!cookie_value[1]){
119					return false;
120				}
121
122				var decoded = decodeURIComponent(cookie_value[1]);
123				return JSON.parse(decoded);
124			} catch {
125				return false;
126			}
127		}
128	}
129	
130	return false;
131}
132
133function cookieadmin_check_consent(){
134	var cookieadmin_cookie = cookieadmin_is_cookie("cookieadmin_consent");
135	if(!!cookieadmin_cookie){
136		if(!!cookieadmin_cookie.consent){
137			cookieadmin_is_consent.consent = cookieadmin_cookie.consent;
138			delete cookieadmin_cookie.consent;
139		}
140		
141		cookieadmin_is_consent.action = cookieadmin_cookie;
142	}
143}
144cookieadmin_check_consent();
145
146function cookieadmin_restore_cookies(update) {
147    
148	var cookieadmin_accepted_categories = [];
149	
150	if(update.accept && update.accept == "true"){
151		
152		document.querySelectorAll(".cookieadmin_toggle").forEach(function(e){
153			key = e.children[0].id;
154			if (key.includes("cookieadmin-")) {
155				key = key.replace("cookieadmin-", "");
156				cookieadmin_accepted_categories.push(key);
157			}
158		});
159		
160	}else if(update.reject && update.reject == "true"){
161		return true;
162	}else{
163		for (var [key, value] of Object.entries(update)) {
164			if(key != "consent"){
165				cookieadmin_accepted_categories.push(key);
166			}
167		}
168	}
169	
170	
171  	for(cookie in cookieadmin_allcookies){
172  		document.cookie = cookieadmin_allcookies[cookie].string;
173  	};
174	
175    cookieadmin_accepted_categories.forEach(function(category) {
176		
177        document.querySelectorAll(
178            'script[type="text/plain"][data-cookieadmin-category="' + category + '"]'
179        ).forEach(function(el) {
180            var newScript = document.createElement('script');
181
182            // Copy attributes
183            if (el.src) {
184                newScript.src = el.src;
185            } else {
186                newScript.text = el.textContent;
187            }
188
189            if (el.defer) newScript.defer = true;
190            if (el.async) newScript.async = true;
191
192            // Copy other attributes if needed
193            ['id', 'class', 'data-name'].forEach(attr => {
194                if (el.hasAttribute(attr)) {
195                    newScript.setAttribute(attr, el.getAttribute(attr));
196                }
197            });
198
199            el.parentNode.replaceChild(newScript, el);
200        });
201    });
202}
203
204function cookieadmin_set_cookie(name, value, days = 365, domain = "") {
205  if (!name || !value) return false;
206
207  var date = new Date();
208  date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); // default 1 year
209
210  var cookieString = `${encodeURIComponent(name)}=${JSON.stringify(value)};`;
211  cookieString += ` expires=${date.toUTCString()};`;
212  cookieString += ` path=${cookieadmin_policy.base_path};`;
213  cookieString += ` SameSite=Lax;`;
214  if(cookieadmin_policy.is_ssl || window.location.protocol === 'https:'){
215	  cookieString += ` Secure;`;
216  }
217
218  // Add domain if explicitly passed
219  if (domain) {
220    cookieString += ` domain=${domain};`;
221  }
222
223  document.cookie = cookieString;
224  return true;
225}
226
227//Populates modal with consent if selected & adds found cookies
228function cookieadmin_populate_preference(){
229	
230	consent = cookieadmin_is_consent.action;
231	
232	if(!!consent){
233		
234		if(consent.accept){
235			document.querySelectorAll(".cookieadmin_toggle").forEach(function(e){
236				e.children[0].checked = true;
237			});
238		}
239		else if(consent.reject){
240			document.querySelectorAll(".cookieadmin_toggle").forEach(function(e){
241				e.children[0].checked = false;
242			});
243		}
244		else{
245			for(btn in consent){
246				if(btn_ele = document.querySelector("#cookieadmin-" + btn)){
247					btn_ele.checked = true;
248				}
249			}
250		}
251	//Load as per preloaded categories selected by admin	
252	}else if(cookieadmin_policy['preload'] && cookieadmin_policy['preload'].length > 0){
253		
254		cookieadmin_policy['preload'].forEach(function(val){
255			if(btn_ele = document.querySelector("#cookieadmin-" + val)){
256				btn_ele.checked = true;
257			}
258		});
259	}
260	
261	var cookieadmin_shown = (typeof cookieadmin_shown !== "undefined") ? cookieadmin_shown : [];
262	
263	if(cookieadmin_allcookies){
264		
265		var cookieadmin_filtrd = Object.keys(cookieadmin_allcookies).filter(e => !cookieadmin_shown.includes(e));
266		
267		for(c_info of cookieadmin_filtrd){
268			
269			var category_var = cookieadmin_allcookies[c_info].category;
270			
271			if(!category_var){
272				continue;
273			}
274			var card_container = document.querySelector(".cookieadmin-" + category_var.toLowerCase());
275			
276			if(!card_container){
277				continue;
278			}
279			card_container.innerHTML = (card_container.innerHTML == 'None') ?  '' : card_container.innerHTML;
280			
281			var cookieadmin_exp = cookieadmin_policy.lang.session;
282				
283			if(
284				!!cookieadmin_allcookies[c_info].expires 
285				&& cookieadmin_allcookies[c_info].expires !== "0000-00-00 00:00:00"
286			){
287				
288				var expDate = new Date(cookieadmin_allcookies[c_info].expires.replace(' ', 'T'));
289				
290				if (!isNaN(expDate.getTime())) {
291					var daysLeft = Math.ceil((expDate.getTime() - Date.now()) / (1000 * 60 * 60 * 24));
292
293					if (daysLeft > 0) {
294						cookieadmin_exp = daysLeft +' '+ cookieadmin_policy.lang.days;
295					}
296				}
297			}
298			
299			card_container.innerHTML += '<div class="cookieadmin-cookie-card"> <div class="cookieadmin-cookie-header"> <strong class="cookieadmin-cookie-name">'+ c_info.replace(/_+$/, "") +'</strong> <span class="cookieadmin-cookie-duration"><b>'+ cookieadmin_policy.lang.duration +':</b> '+ cookieadmin_exp +'</span> </div> <p class="cookieadmin-cookie-description">'+ cookieadmin_allcookies[c_info].description +'</p> <div class="cookieadmin-cookie-tags"> ' + (cookieadmin_allcookies[c_info].platform ? '<span class="cookieadmin-tag">' + cookieadmin_allcookies[c_info].platform + '</span>' : "") + ' </div> </div>';
300			cookieadmin_shown.push(c_info);
301		}
302	}
303		
304}
305
306function cookieadmin_toggle_overlay(){
307	
308	if(window.getComputedStyle(document.getElementsByClassName("cookieadmin_modal_overlay")[0]).display == "none"){
309		document.getElementsByClassName("cookieadmin_modal_overlay")[0].style.display = "block";
310	}else{
311		document.getElementsByClassName("cookieadmin_modal_overlay")[0].style.display = "none";
312	}
313	
314}
315
316function cookieadmin_categorize_cookies(){
317	
318	if(!cookieadmin_allcookies){
319		return;
320	}
321	
322	var cookieadmin_chk_cookies = {};
323	var cookieadmin_consent_chng = [];
324	
325	for(a_cookie in cookieadmin_allcookies){
326		if(!cookieadmin_allcookies[a_cookie].category){
327			cookieadmin_chk_cookies[a_cookie] = cookieadmin_allcookies[a_cookie];
328		}else if(cookieadmin_is_consent.old_action !== cookieadmin_is_consent.action && a_cookie !== "cookieadmin_consent"){
329			document.cookie = cookieadmin_allcookies[a_cookie].string;
330		}
331	}
332	
333	if(!cookieadmin_is_obj(cookieadmin_chk_cookies)){
334		return;
335	}
336	
337	/* var xhttp2 = new XMLHttpRequest();
338	
339	var data = 'action=cookieadmin_ajax_handler&cookieadmin_act=categorize_cookies&cookieadmin_security=' + cookieadmin_policy.nonce + "&cookieadmin_cookies=" + JSON.stringify(cookieadmin_chk_cookies);
340	
341	xhttp2.onload = function() {
342		parsd = JSON.parse(this.responseText);
343		
344		if(parsd.success){
345			cookies = parsd.data;
346			for(coki in cookies){
347				cookieadmin_chk_cookies[coki].name = coki;
348				if(cookies[coki].category === "un_c"){
349					cookieadmin_chk_cookies[coki].source = "unknown";
350					cookieadmin_chk_cookies[coki].description = "unknown";
351				}
352				cookieadmin_allcookies[coki] = cookieadmin_chk_cookies[coki];
353				document.cookie = cookieadmin_chk_cookies[coki].string;
354			}
355		}
356	}
357	
358	xhttp2.open("POST", cookieadmin_policy.ajax_url, true);
359	xhttp2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
360	xhttp2.send(data); */
361}
362
363
364document.addEventListener("DOMContentLoaded", function() {
365	
366	var cookieadmin_show_reconsent = 0;
367	if(cookieadmin_policy.is_pro != 0 && cookieadmin_pro_vars !== 'undefined' && cookieadmin_pro_vars.reconsent != 0){
368		var cookieadmin_show_reconsent = 1;
369	}
370
371	//Create overlay
372	var cookieadmin_ovrlay =  document.createElement("div");
373	cookieadmin_ovrlay.className = "cookieadmin_modal_overlay";
374	document.body.appendChild(cookieadmin_ovrlay);
375	
376	var before_consent_dispaly = new CustomEvent('cookieadmin_before_consent_display');
377	
378	// For anything that needs to be done before disaplying consent.
379	cookieadmin_policy.hide_banner = false; // initializing
380	window.dispatchEvent(before_consent_dispaly);
381
382	//Show notice or re-consent icon as needed
383	if(!cookieadmin_is_obj(cookieadmin_is_consent) && !cookieadmin_policy.hide_banner){
384		
385		if(cookieadmin_policy.cookieadmin_layout !== "popup"){
386				document.getElementsByClassName("cookieadmin_law_container")[0].style.display = "block";
387		}else{
388			cookieadmin_toggle_overlay();
389			document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "flex";
390		}
391		
392		/* //block cookie scripts
393		var cookieadmin_blockedScripts = [
394			'https://www.google-analytics.com/analytics.js',
395			'https://connect.facebook.net/en_US/fbevents.js',
396			'https://www.youtube.com/iframe_api'
397		];
398		
399		cookieadmin_blockedScripts.forEach(function(scriptUrl) {
400			var scriptTag = document.querySelector(`script[src='${scriptUrl}']`);
401			if (scriptTag) {
402				scriptTag.remove();  // Remove script if already loaded
403			}
404		}); */
405		
406	}else if(cookieadmin_show_reconsent){
407		document.getElementsByClassName("cookieadmin_re_consent")[0].style.display = "block";	
408		
409	}
410	
411	//Edit Notice and Modal contents
412
413	cookieadmin_populate_preference();
414
415	for(data in cookieadmin_policy){
416
417		typ = 0;
418		if(data.includes("_bg_color")){
419			d_ele = data.replace("_bg_color", "");
420			typ = 1;
421		}else if(data.includes("_border_color")){
422			d_ele = data.replace("_border_color", "");
423			typ = 2;
424		}else if(data.includes("_color")){
425			d_ele = data.replace("_color", "");
426			typ = 3;
427		}else{
428			d_ele = data;
429		}
430		
431		d_eles = [];
432		if(document.getElementById(d_ele)){
433			d_eles = [document.getElementById(d_ele)];
434		}
435		if(document.getElementsByClassName(d_ele).length){
436			d_eles = (document.getElementsByClassName(d_ele).length > 1) ? document.getElementsByClassName(d_ele) : [document.getElementsByClassName(d_ele)[0]];
437		}
438		
439		if(!!d_eles){
440			i = 0;
441			while(i < d_eles.length){
442				d_ele = d_eles[i];
443				if(typ == 3){
444					d_ele.style.color = cookieadmin_policy[data];
445				}else if(typ == 2){
446					d_ele.style.borderColor = cookieadmin_policy[data];
447				}else if(typ == 1){
448					d_ele.style.backgroundColor = cookieadmin_policy[data];
449				}else{
450					d_ele.innerHTML = cookieadmin_policy[data];
451				}
452				i++;
453			}
454		}		
455	}
456
457	//Add layout as class
458	if(!!cookieadmin_policy.cookieadmin_position && cookieadmin_policy.cookieadmin_layout !== "popup"){
459		cookieadmin_policy.cookieadmin_position.split("_").forEach(function(clas){
460			clas = "cookieadmin_" + clas;
461			document.getElementsByClassName("cookieadmin_law_container")[0].classList.add(clas);
462		});
463	}
464
465	// Change consent layout dynamically
466  // TODO: There is a operator called optional chaining operator ?. something like this users?.[0]?.name; wont use it now just for reference
467	var  cookieadmin_law_container_var = document.getElementsByClassName("cookieadmin_law_container")[0];
468	if (!!cookieadmin_law_container_var){
469		cookieadmin_law_container_var.classList.add("cookieadmin_" + cookieadmin_policy.cookieadmin_layout);
470	}
471
472	// Change Modal layout dynamically
473	document.getElementsByClassName("cookieadmin_cookie_modal")[0].classList.add("cookieadmin_" + cookieadmin_policy.cookieadmin_modal);
474
475	/*if(cookieadmin_policy.layout == "footer"){
476		
477	}*/
478
479	if(cookieadmin_policy.cookieadmin_modal == "side"){
480		document.getElementsByClassName("cookieadmin_modal_footer")[0].style.flexDirection = "column";
481	}
482		
483	// Remove modal close Button
484	if(cookieadmin_policy.cookieadmin_layout == "popup"){
485		document.getElementsByClassName("cookieadmin_close_pref")[0].style.display = "none";
486	}
487
488	//show preference modal
489	cookieadmin_show_modal_elemnts = document.querySelectorAll(".cookieadmin_re_consent, .cookieadmin_customize_btn");
490	cookieadmin_show_modal_elemnts.forEach(function(e){
491		
492		e.addEventListener("click", function(e){
493			
494			/*cookieadmin_is_cookie("all").forEach(function(e){
495				c_name = e.split("=")[0].trim();
496				if(!!cookieadmin_allcookies[c_name]){
497					console.log(JSON.stringify(cookieadmin_allcookies[c_name]));
498				}
499			});*/
500			
501			cookieadmin_toggle_overlay();
502			document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "flex";
503			var cookieadmin_re_consent = document.getElementsByClassName("cookieadmin_re_consent")[0];
504			if(cookieadmin_re_consent){
505				cookieadmin_re_consent.style.display = "none";
506			}
507
508			var cookieadmin_law_container = document.getElementsByClassName("cookieadmin_law_container")[0];
509			if(cookieadmin_law_container){
510				cookieadmin_law_container.style.display = "none";
511			}
512			
513			if(cookieadmin_policy["cookieadmin_modal"] == "side"){
514				document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "grid";
515			}
516			
517			if(e.target.className == "cookieadmin_re_consent"){
518				document.getElementsByClassName("cookieadmin_close_pref")[0].id = "cookieadmin_re_consent";
519			}else{
520				document.getElementsByClassName("cookieadmin_close_pref")[0].id = "cookieadmin_law_container";
521			}
522		});
523	});
524	
525	//Save preference
526	document.querySelector(".cookieadmin_save_btn").addEventListener("click", function(){
527		
528		document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "none";
529		if(cookieadmin_show_reconsent){
530			document.getElementsByClassName("cookieadmin_re_consent")[0].style.display = "block";
531		}
532		
533		var prefer = {};
534
535		document.querySelectorAll(".cookieadmin_toggle").forEach(function(e){
536			if(!!e.children[0].checked){
537				prefer[e.children[0].id.replace("cookieadmin-","")] = 'true';
538			}
539		});
540		
541		if(Object.keys(prefer).length !== 0){
542			var override_gpc = document.getElementById('cookieadmin-override_gpc');
543			var is_override_gpc = false;
544			if(override_gpc && override_gpc.checked){
545				is_override_gpc = true;
546			}
547
548			if(Object.keys(prefer).length === 3 && !is_override_gpc){
549				let accept_btn = document.querySelectorAll(".cookieadmin_accept_btn");
550			
551				if(accept_btn.length > 0){
552					accept_btn[accept_btn.length-1].click();
553				}
554
555				return;
556			}
557		}else{
558			let reject_btn = document.querySelectorAll(".cookieadmin_reject_btn");
559			
560			if(reject_btn.length > 0){
561				reject_btn[reject_btn.length-1].click();
562			}
563			
564			return;
565		}
566		
567		cookieadmin_toggle_overlay();
568
569		cookieadmin_set_consent(prefer, days);
570	});
571
572
573	//Accept or reject all cookies
574	cookieadmin_save_all_cookie_elemnts = document.querySelectorAll(".cookieadmin_accept_btn, .cookieadmin_reject_btn");
575
576	cookieadmin_save_all_cookie_elemnts.forEach(function(e){
577		
578		e.addEventListener("click", function(){
579			// console.log(e);
580
581			document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "none";
582			var cookieadmin_law_container = document.getElementsByClassName("cookieadmin_law_container")[0];
583			if(cookieadmin_law_container){
584				cookieadmin_law_container.style.display = "none";
585			}
586			
587			var cookieadmin_re_consent = document.getElementsByClassName("cookieadmin_re_consent")[0];
588			if(cookieadmin_re_consent){
589				cookieadmin_re_consent.style.display = "block";
590			}
591			
592			if(e.id.includes("modal")){
593				cookieadmin_toggle_overlay();
594			}
595			
596			var prefer2 = e.classList.contains("cookieadmin_reject_btn") ? {reject: "true"} : {accept: "true"};
597			
598			cookieadmin_set_consent(prefer2, days);
599		});
600	});
601	
602	document.querySelectorAll(".cookieadmin_show_pref_cookies").forEach(function(e){
603		e.addEventListener("click", function(el){
604			
605			var tgt = el.target.id;
606			tgt = tgt.replace(/-container$/, "");
607			
608			if(el.target.classList.contains("dwn")){
609				el.target.innerHTML = "&#9658;";
610				el.target.classList.remove("dwn");
611				document.querySelector("."+tgt).style.display = "none";
612			}else{
613				el.target.innerHTML = "&#9660;";
614				el.target.classList.add("dwn");
615				document.querySelector("."+tgt).style.display = "block";
616			}
617		});
618	});
619
620	document.getElementsByClassName("cookieadmin_close_pref")[0].addEventListener("click", function(e){
621		document.getElementsByClassName("cookieadmin_cookie_modal")[0].style.display = "none";
622		cookieadmin_toggle_overlay();
623		if(!cookieadmin_is_obj(cookieadmin_is_consent)){
624			var cookieadmin_law_container = document.getElementsByClassName("cookieadmin_law_container")[0];
625			if(cookieadmin_law_container){
626				cookieadmin_law_container.style.display = "block";
627			}
628		}else if(cookieadmin_show_reconsent){
629			var cookieadmin_re_consent = document.getElementsByClassName("cookieadmin_re_consent")[0];
630			if(cookieadmin_re_consent){
631				cookieadmin_re_consent.style.display = "block";
632			}
633		}
634	});
635	
636});
637
638function cookieadmin_set_consent(prefrenc, days){
639	
640	if (typeof cookieadmin_pro_set_consent === "function") {
641		return cookieadmin_pro_set_consent(prefrenc, days);
642	}else{
643		return cookieadmin_save_consent_cookie(prefrenc, days);
644	}
645}
646
647function cookieadmin_save_consent_cookie(prefrenc, days, consent_id){
648	
649	var cookieadmin_consent = prefrenc;
650		
651	if(consent_id){
652		cookieadmin_is_consent.consent = consent_id;
653		cookieadmin_consent['consent'] = consent_id;
654	}
655	
656	if(!cookieadmin_is_consent.consent){
657		cookieadmin_is_consent.consent = "";
658	}
659	
660	cookieadmin_is_consent["old_action"] = cookieadmin_is_consent.action ? c
660ookieadmin_is_consent.action : {};
661	cookieadmin_is_consent.action = prefrenc;
662	cookieadmin_populate_preference();
663	cookieadmin_set_cookie('cookieadmin_consent', cookieadmin_consent, days);
664	
665	if (typeof cookieadmin_update_gcm === "function") {
666		cookieadmin_update_gcm(1);
667	}
668	
669	if(!!cookieadmin_policy.reload_on_consent){
670		location.reload();
671	}else{
672		cookieadmin_restore_cookies(prefrenc);
673	}
674}
675

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.