1// function 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// } 7 8function setCookie(cname, cvalue, exdays) { 9 var d = new Date(); 10 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 11 var expires = "expires=" + d.toUTCString(); 12 var sameSite = "SameSite=None; Secure"; // Dodaj atrybut SameSite i Secure 13 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/;" + sameSite; 14} 15 16function getCookie(cname) { 17 var name = cname + "="; 18 var ca = document.cookie.split(';'); 19 for (var i = 0; i < ca.length; i++) { 20 var c = ca[i]; 21 while (c.charAt(0) == ' ') { 22 c = c.substring(1); 23 } 24 if (c.indexOf(name) == 0) { 25 return c.substring(name.length, c.length); 26 } 27 } 28 return ""; 29}
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.