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