1const language = document.documentElement.getAttribute('lang'); 2const hostname = location.hostname.split('.') 3const domain = hostname.slice(0).slice(-(hostname.length === 4 ? 3 : 2)).join('.'); 4const cookie = Cookies.withAttributes({ path: '/', domain: '.' + domain, sameSite: 'lax' }); 5 6if (typeof moment !== 'undefined') { 7 moment.locale(language); 8} 9 10if (typeof numeral !== 'undefined') { 11 numeral.locale(language); 12} 13 14function unique_id() { 15 var idStrLen = 16; 16 var idStr = (Math.floor((Math.random() * 25)) + 10).toString(36) + "_"; 17 idStr += (new Date()).getTime().toString(36) + "_"; 18 do { 19 idStr += (Math.floor((Math.random() * 35))).toString(36); 20 } while (idStr.length < idStrLen); 21 return (idStr); 22} 23 24function ucfirst(string) { 25 return string.charAt(0).toUpperCase() + string.slice(1); 26}
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.