PageSourceSearch

https://www.ville-rodez.fr/plugins/lae-cookies/assets/js/popup-fin.js?ver=2.3

js ville-rodez.fr collected 2026-10-02 07:05:05 UTC 4,564 bytes, 130 lines download raw bytes

1(function() {
2
3	var isAdmin = laeCookiesOptions.is_user_logged_in == '1';
4	var lHost = window.location.host;
5	var isLoc = lHost && lHost.endsWith('.loc');
6
7	if (!isAdmin && !isLoc) {
8
9		if (laeCookiesOptions.googletagmanagerId) {
10			tarteaucitron.user.googletagmanagerId = '' + laeCookiesOptions.googletagmanagerId;
11			(tarteaucitron.job = tarteaucitron.job || []).push('googletagmanager');
12		} else if (laeCookiesOptions.analyticsUa) {
13			if (laeCookiesOptions.typeUa == 'universal') {
14				tarteaucitron.user.analyticsUa = laeCookiesOptions.analyticsUa;
15				// tarteaucitron.user.analyticsMore = function () { /* add here your optionnal ga.push() */ };
16				(tarteaucitron.job = tarteaucitron.job || []).push('analytics');
17			} else {
18				tarteaucitron.user.gtagUa = laeCookiesOptions.analyticsUa;
19				// tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ };
20				(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
21			}
22		}
23		if (laeCookiesOptions.facebookpixelId) {
24			tarteaucitron.user.facebookpixelId = '' + laeCookiesOptions.facebookpixelId;
25			// tarteaucitron.user.facebookpixelMore = function () { /* add here your optionnal facebook pixel function */ };
26			(tarteaucitron.job = tarteaucitron.job || []).push('facebookpixel');
27		}
28		if (laeCookiesOptions.youtube) {
29			(tarteaucitron.job = tarteaucitron.job || []).push('youtube');
30		}
31		if (laeCookiesOptions.vimeo) {
32			(tarteaucitron.job = tarteaucitron.job || []).push('vimeo');
33		}
34
35	}
36	
37	function getCookie(cname) {
38		let name = cname + "=";
39		let decodedCookie = decodeURIComponent(document.cookie);
40		let ca = decodedCookie.split(';');
41		for(let i = 0; i <ca.length; i++) {
42			let c = ca[i];
43			while (c.charAt(0) == ' ') {
44				c = c.substring(1);
45			}
46			if (c.indexOf(name) == 0) {
47				return c.substring(name.length, c.length);
48			}
49		}
50		return "";
51	}
52
53	var LaeRgpdPop = function () {
54		this.dom = null;
55		var popMasque = localStorage.getItem('LaeRgpdPop');
56		if (!(popMasque && popMasque === 'true')) {
57			this.show();
58			return;
59		} // else verification si tarte au citron en attente
60		var cookieRgpd = getCookie('lae-rgpd');
61		if (!cookieRgpd || cookieRgpd.includes('wait')) {
62			this.show();
63		}
64	};	
65	LaeRgpdPop.prototype.show = function () {
66		var that = this;
67		this.dom = document.createElement('div');
68		this.dom.innerHTML = '<div class="txt">' + tarteaucitron.lang.alertBigPrivacy + '<p><a target="_blank" href="' + laeCookiesOptions.privacyUrl + '">' + tarteaucitron.lang.privacyUrl + '</a></p></div>';
69		
70		this.btns = document.createElement('div');
71		this.btns.setAttribute('class', 'btns');
72
73		this.denyBtn = document.createElement('button');
74		this.denyBtn.setAttribute('class', 'btn deny');
75		this.denyBtn.innerHTML = tarteaucitron.lang.denyAll;
76		this.denyBtn.onclick = function() {
77			tarteaucitron.userInterface.respondAll(false);
78			that.hide();
79			var xhr = new XMLHttpRequest();
80			xhr.withCredentials = true;
81			xhr.open("GET", "https://webservices.laetis.fr/public/rgpd/data-stat-popup/deny--" + window.location.hostname);
82			xhr.send();
83		};
84
85		this.personalizeBtn = document.createElement('button');
86		this.personalizeBtn.setAttribute('class', 'btn personalize');
87		this.personalizeBtn.innerHTML = tarteaucitron.lang.personalize;
88		this.personalizeBtn.onclick = function() {
89			tarteaucitron.userInterface.openPanel();
90			that.hide();
91			var xhr = new XMLHttpRequest();
92			xhr.withCredentials = true;
93			xhr.open("GET", "https://webservices.laetis.fr/public/rgpd/data-stat-popup/personalize--" + window.location.hostname);
94			xhr.send();
95		};
96
97		this.allowBtn = document.createElement('button');
98		this.allowBtn.setAttribute('class', 'btn allow');
99		this.allowBtn.innerHTML = tarteaucitron.lang.allowAll;
100		this.allowBtn.onclick = function() {
101			tarteaucitron.userInterface.respondAll(true);
102			that.hide();
103			var xhr = new XMLHttpRequest();
104			xhr.withCredentials = true;
105			xhr.open("GET", "https://webservices.laetis.fr/public/rgpd/data-stat-popup/allow--" + window.location.hostname);
106			xhr.send();
107		};
108
109		this.btns.appendChild(that.allowBtn);
110		this.btns.appendChild(that.personalizeBtn);
111		this.btns.appendChild(that.denyBtn);
112
113		this.dom.appendChild(that.btns);
114
115		this.dom.id = 'lae-rgpd-pop';
116		document.getElementById('tarteaucitronRoot').appendChild(that.dom);
117	};
118	LaeRgpdPop.prototype.hide = function () {
119		localStorage.setItem('LaeRgpdPop', 'true');
120		this.dom.remove();
121	};
122
123	
124	if (!isAdmin && !isLoc) {
125		window.addEventListener("tac.root_available", function () {
126			new LaeRgpdPop();
127		}, false);
128	}
129
130})();

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.