1// Creare's 'Implied Consent' EU Cookie Law Banner v:2.4 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 = '<p align="center">Cookies Google <a href="javascript:void(0);" onclick="erase();"><span>Refuser et sortir</span></a></p>'; 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 createCookie(window.cookieName,window.cookieValue, window.cookieDuration); // Create the cookie 23} 24 25 26function createCookie(name,value,days) { 27 if (days) { 28 var date = new Date(); 29 date.setTime(date.getTime()+(days*24*60*60*1000)); 30 var expires = "; expires="+date.toGMTString(); 31 } 32 else var expires = ""; 33 if(window.dropCookie) { 34 document.cookie = name+"="+value+expires+"; path=/"; 35 } 36} 37 38function checkCookie(name) { 39 var nameEQ = name + "="; 40 var ca = document.cookie.split(';'); 41 for(var i=0;i < ca.length;i++) { 42 var c = ca[i]; 43 while (c.charAt(0)==' ') c = c.substring(1,c.length); 44 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 45 } 46 return null; 47} 48 49function eraseCookie(name) { 50 createCookie(name,"",-1); 51} 52 53function removeMe(){ 54 var element = document.getElementById('cookie-law'); 55 element.parentNode.removeChild(element); 56} 57 58function erase() { 59 document.cookie = "complianceCookie=; expires=Mon, 02 Oct 2000 01:00:00 GMT; path=/"; 60 removeMe(); 61 document.location = 'https://www.minibluff.com'; 62} 63 64window.onload = function(){ 65 if(checkCookie(window.cookieName) != window.cookieValue){ 66 createDiv(); 67 } 68} 69
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.