1/* 2 29-09-2022 3 Helpers del sitio web 4 Funciones estandares 5 nombre : helper[nombre de la funcion] 6 descripcion : devuleve el url ubicacion relativo y no abosulto 7*/ 8function helperBuildURL(){ 9 let mystring = ""; 10 let myUrl = ""; 11 let myHost = ""; 12 let myWindowOrigin = ""; 13 14 myHost = window.location.hostname; 15 let myArray = myHost.split('.'); 16 // 17 // Si no tiene www. el url se le inserta para luego quitarse y poder evaluar el segudo segmento 18 // https://datacrm.com se convierte en www.datacrm.com 19 // problema que se presenta mucho en produccion con clientes con accesos directos 20 // 21 if (myArray[0].toLowerCase() === "datacrm"){ 22 myArray.unshift('www'); 23 myWindowOrigin = 'https://' + myArray[0] + '.' + myArray[1] + '.' + myArray[2]; 24 } else{ 25 myWindowOrigin = window.origin ; 26 } 27 28 myArray.shift(); 29 myArray.pop(); 30 31 myUrl = myArray.toString().replace(",","."); 32 33 if (myUrl === "datacrm"){ 34 mystring = myWindowOrigin + '/'; 35 } 36 37 myUrl = window.location.origin + window.location.pathname; 38 let myindex = myUrl.indexOf("public/"); 39 if (myindex != -1){ 40 mystring = myUrl.substring(0, myindex + 7) 41 } 42 43 return mystring; 44}
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.