1(function () { 2 //source: https://www.w3schools.com/js/js_cookies.asp 3 function getCookie(cname) { 4 var name = cname + "="; 5 var decodedCookie = decodeURIComponent(document.cookie); 6 var ca = decodedCookie.split(";"); 7 for (var i = 0; i < ca.length; i++) { 8 var c = ca[i]; 9 while (c.charAt(0) == " ") { 10 c = c.substring(1); 11 } 12 if (c.indexOf(name) == 0) { 13 return c.substring(name.length, c.length); 14 } 15 } 16 return ""; 17 } 18 19 //source: https://www.w3schools.com/js/js_cookies.asp 20 function setCookie(cname, cvalue, exdays) { 21 var d = new Date(); 22 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 23 var expires = "expires=" + d.toUTCString(); 24 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 25 } 26 27 const COOKIE_NAME = "cookies-consent"; 28 new Vue({ 29 el: "#cookies-law", 30 data() { 31 return { 32 display: false 33 }; 34 }, 35 mounted() { 36 const cookie = getCookie(COOKIE_NAME); 37 this.display = !cookie; 38 }, 39 methods: { 40 hide() { 41 this.display = false; 42 setCookie(COOKIE_NAME, 1, 365); 43 } 44 } 45 }); 46})();
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.