1 2function setCookie(cname, cvalue, exdays) { 3 var d = new Date(); 4 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 5 var expires = "expires="+d.toUTCString(); 6 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 7} 8 9function getCookie(cname) { 10 var name = cname + "="; 11 var ca = document.cookie.split(';'); 12 for(var i = 0; i < ca.length; i++) { 13 var c = ca[i]; 14 while (c.charAt(0) == ' ') { 15 c = c.substring(1); 16 } 17 if (c.indexOf(name) == 0) { 18 return c.substring(name.length, c.length); 19 } 20 } 21 return null; 22} 23 24function stringify(obj_from_json) { 25 if (typeof obj_from_json !== "object" || Array.isArray(obj_from_json)){ 26 // not an object, stringify using native function 27 return JSON.stringify(obj_from_json); 28 } 29 // Implements recursive object serialization according to JSON spec 30 // but without quotes around the keys. 31 let props = Object 32 .keys(obj_from_json) 33 .map(key => `${key}:${stringify(obj_from_json[key])}`) 34 .join(","); 35 return `{${props}}`; 36}
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.