1 2function listCookies() { 3 var theCookies = document.cookie.split(';'); 4 var aString = ''; 5 for (var i = 1 ; i <= theCookies.length; i++) { 6 aString += i + ' ' + theCookies[i-1] + "\n"; 7 } 8 return aString; 9 } 10 11 function createCookie(name,value,days) { 12 var expires; 13 if (days) { 14 var date = new Date(); 15 date.setTime(date.getTime() + (days * 24 * 60 * 60 *1000)); 16 expires = "; expires=" + date.toGMTString(); 17 } 18 else { 19 expires = ""; 20 } 21 document.cookie = name + "=" + value + expires + "; path=/"; 22 } 23 24 function readCookie(name) { 25 var nameEQ = name + "="; 26 var ca = document.cookie.split(';'); 27 for(var i=0;i < ca.length;i++) { 28 var c = ca[i]; 29 while (c.charAt(0)==' ') { 30 c = c.substring(1,c.length); 31 } 32 if (c.indexOf(nameEQ) == 0) { 33 return c.substring(nameEQ.length,c.length); 34 } 35 } 36 return null; 37 }
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.