1function setCookie(cname, cvalue, exdays) { 2 var d = new Date(); 3 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 4 var expires = "expires="+d.toUTCString(); 5 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 6 console.log("Cookie has been set: "+document.cookie); 7 document.getElementById('cookie-consent').style.visibility = 'hidden'; 8 } 9 10 function getCookie(cname) { 11 var name = cname + "="; 12 var ca = document.cookie.split(';'); 13 for(var i = 0; i < ca.length; i++) { 14 var c = ca[i]; 15 while (c.charAt(0) == ' ') { 16 c = c.substring(1); 17 } 18 if (c.indexOf(name) == 0) { 19 return c.substring(name.length, c.length); 20 } 21 } 22 return ""; 23 } 24 25 function checkCookie(cname) { 26 var cookie_value = getCookie(cname); 27 if (cookie_value != "") { 28 console.log("Cookies were accepted"); 29 }else{ 30 document.getElementById('cookie-consent').style.visibility = 'visible'; 31 //show disclaimer.... 32 } 33 }
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.