1const Avelon = { 2 version: "1.0.10", 3 cidKey: 'avln_cid', 4 attributionDays: 365, 5 getCookie: function(a) { 6 const d = [], 7 e = document.cookie.split(";"); 8 a = RegExp("^\\s*" + a + "=\\s*(.*?)\\s*$"); 9 for (let b = 0; b < e.length; b++) { 10 const f = e[b].match(a); 11 f && d.push(f[1]) 12 } 13 return d.length ? d[0] : null; 14 }, 15 setCookie: function(key, value) { 16 const date = new Date(); 17 date.setTime(date.getTime() + (this.attributionDays * 24 * 60 * 60 * 1000)); 18 document.cookie = key + '=' + value + '; Domain=' + location.hostname + '; SameSite=strict; expires=' + date.toUTCString() + '; path=/'; 19 }, 20 setCid: function () { 21 const url = new URL(location.href), 22 params = url.searchParams, 23 cid = params.get(this.cidKey), 24 cidCookie = this.getCookie(this.cidKey), 25 cidLs = localStorage.getItem(this.cidKey); 26 27 if (cid) { 28 this.setCookie(this.cidKey, cid); 29 localStorage.setItem(this.cidKey, cid); 30 } 31 else if (cidCookie) { 32 this.setCookie(this.cidKey, cidCookie); 33 localStorage.setItem(this.cidKey, cidCookie); 34 } 35 else if (cidLs) { 36 this.setCookie(this.cidKey, cidLs); 37 localStorage.setItem(this.cidKey, cidLs); 38 } 39 } 40} 41 42Avelon.setCid();
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.