1// Create cookie 2function setCookie(cname, cvalue, exdays) { 3 const d = new Date(); 4 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 5 let expires = "expires=" + d.toUTCString(); 6 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/" + ";sameSite=None; Secure"; 7} 8 9// Delete cookie 10function deleteCookie(cname) { 11 const d = new Date(); 12 d.setTime(d.getTime() + (24 * 60 * 60 * 1000)); 13 let expires = "expires=" + d.toUTCString(); 14 document.cookie = cname + "=;" + expires + ";path=/"; 15} 16 17// Read cookie 18function getCookie(cname) { 19 let name = cname + "="; 20 let decodedCookie = decodeURIComponent(document.cookie); 21 let ca = decodedCookie.split(';'); 22 for (let i = 0; i < ca.length; i++) { 23 let c = ca[i]; 24 while (c.charAt(0) == ' ') { 25 c = c.substring(1); 26 } 27 if (c.indexOf(name) == 0) { 28 return c.substring(name.length, c.length); 29 } 30 } 31 return ""; 32} 33// Set cookie consent 34function acceptCookieConsent() { 35 deleteCookie('user_cookie_consent'); 36 setCookie('user_cookie_consent', 1, 30); 37 document.getElementById("cookieNotice").style.display = "none"; 38} 39 40function rejectCookieConsent() { 41 document.cookie.split(";").forEach(function (c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); }); 42 document.getElementById("cookieNotice").style.display = "none"; 43}
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.