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 = 30; // 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','warning-p'); 13 div.innerHTML = '<div class="warning">By Entering this site you confirm you are over 18 years of age, wish to view adult videos (pornography) and it is legal to view adult related material in your country.<br><br><a class="close-cookie-banner btn-primary enter" href="javascript:void(0);" onclick="removeMe();">Enter</a><a href="https://www.google.com" class="btn-primary exit">Exit</a></div>'; 14 15 bodytag.insertBefore(div,bodytag.firstChild); // Adds the Cookie Law Banner just after the opening <body> tag 16 17 document.getElementsByTagName('body')[0].className+=' cookiebanner'; //Adds a class tothe <body> tag when the banner is visible 18} 19 20 21function createCookie(name,value,days) { 22 if (days) { 23 var date = new Date(); 24 date.setTime(date.getTime()+(days*24*60*60*1000)); 25 var expires = "; expires="+date.toGMTString(); 26 } 27 else var expires = ""; 28 if(window.dropCookie) { 29 document.cookie = name+"="+value+expires+"; path=/"; 30 } 31} 32 33function checkCookie(name) { 34 var nameEQ = name + "="; 35 var ca = document.cookie.split(';'); 36 for(var i=0;i < ca.length;i++) { 37 var c = ca[i]; 38 while (c.charAt(0)==' ') c = c.substring(1,c.length); 39 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 40 } 41 return null; 42} 43 44function eraseCookie(name) { 45 createCookie(name,"",-1); 46} 47 48window.onload = function(){ 49 if(checkCookie(window.cookieName) != window.cookieValue){ 50 createDiv(); 51 } 52} 53 54function removeMe(){ 55 // Create the cookie only if the user click on "Close" 56 createCookie(window.cookieName,window.cookieValue, window.cookieDuration); // Create the cookie 57 // then close the window/ 58 var element = document.getElementById('warning-p'); 59 element.parentNode.removeChild(element); 60}
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.