PageSourceSearch

https://haute-flourie.com/_assets/js/gdpr-cookie.js

js haute-flourie.com collected 2026-10-07 14:49:13 UTC 2,639 bytes, 63 lines download raw bytes

1// Creare's 'Implied Consent' EU Cookie Law Banner v:2.4.1
2// Conceived by Robert Kent, James Bavington & Tom Foyster
3
4var dropCookie = true;                      // false disables the Cookie, allowing you to style the banner
5var cookieDuration = 14;                    // Number of days before the cookie expires, and the banner reappears
6var cookieName = 'complianceCookie';        // Name of our cookie
7var cookieValue = 'on';                     // Value of cookie
8
9function createDiv(){
10    var bodytag = document.getElementsByTagName('body')[0];
11    var div = document.createElement('div');
12    div.setAttribute('id','cookie-law');
13    div.innerHTML = '<span><p>En poursuivant votre navigation sur ce site, vous nous autorisez à utiliser des cookies.  <a class="cookie-lk" href="https://haute-flourie.com/a-propos/politique-de-confidentialite.php" rel="nofollow" title="En savoir plus"> En savoir plus</a></p></span><div class="close-cookie-ct"><a class="close-cookie-banner" href="javascript:void(0);" onclick="removeMe();"><button class="btn-close"></button></a></div>';
14 // Be advised the Close Banner 'X' link requires jQuery
15
16    // bodytag.appendChild(div); // Adds the Cookie Law Banner just before the closing </body> tag
17    // or
18    bodytag.insertBefore(div,bodytag.firstChild); // Adds the Cookie Law Banner just after the opening <body> tag
19
20    document.getElementsByTagName('body')[0].className+=' cookiebanner'; //Adds a class tothe <body> tag when the banner is visible
21}
22
23
24function createCookie(name,value,days) {
25    if (days) {
26        var date = new Date();
27        date.setTime(date.getTime()+(days*24*60*60*1000));
28        var expires = "; expires="+date.toGMTString();
29    }
30    else var expires = "";
31    if(window.dropCookie) {
32        document.cookie = name+"="+value+expires+"; path=/";
33    }
34}
35
36function checkCookie(name) {
37    var nameEQ = name + "=";
38    var ca = document.cookie.split(';');
39    for(var i=0;i < ca.length;i++) {
40        var c = ca[i];
41        while (c.charAt(0)==' ') c = c.substring(1,c.length);
42        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
43    }
44    return null;
45}
46
47function eraseCookie(name) {
48    createCookie(name,"",-1);
49}
50
51window.onload = function(){
52    if(checkCookie(window.cookieName) != window.cookieValue){
53        createDiv();
54    }
55}
56
57function removeMe(){
58	// Create the cookie only if the user click on "Close"
59	createCookie(window.cookieName,window.cookieValue, window.cookieDuration); // Create the cookie
60	// then close the window/
61	var element = document.getElementById('cookie-law');
62	element.parentNode.removeChild(element);
63}

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.