1/** 2 * Cookie codes based on the following URL: 3 * https://www.quirksmode.org/js/cookies.html#ex 4 * 5 * @since 2.1 6 */ 7function createCookie(name,value,days) { 8 var expires = ""; 9 if (days) { 10 var date = new Date(); 11 date.setTime(date.getTime()+(days*24*60*60*1000)); 12 var expires = "; expires="+date.toGMTString(); 13 } 14 document.cookie = name+"="+value+expires+"; path=/"; 15} 16 17function readCookie(name) { 18 var nameEQ = name + "="; 19 var ca = document.cookie.split(";"); 20 for(var i=0;i < ca.length;i++) { 21 var c = ca[i]; 22 while (c.charAt(0)==" ") c = c.substring(1,c.length); 23 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 24 } 25 return null; 26} 27 28function eraseCookie(name) { 29 createCookie(name,"",-1); 30}
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.