1function pesquisarGoogle(campo) { 2 var texto = document.getElementById(campo).value.trim(); 3 4 if (!texto) { 5 document.getElementById(campo).focus(); 6 return; 7 } 8 9 window.location.href = 10 URL_PESQUISA_GOOGLE + 11 "#gsc.tab=0&gsc.q=" + 12 encodeURIComponent(texto) + 13 "&gsc.sort=&gsc.page=1"; 14} 15 16function initEventosGoogle() { 17 let campos = ['pesquisa', 'pesquisa2']; 18 let botoes = ['btnPesquisar', 'btnPesquisar2']; 19 20 for (let i = 0; i < campos.length; i++) { 21 22 document.getElementById(botoes[i]).onclick = pesquisarGoogle; 23 24 document.getElementById(campos[i]).addEventListener("keydown", function(e) { 25 if (e.key === "Enter" || e.keyCode === 13) { 26 e.preventDefault(); 27 pesquisarGoogle(campos[i]); 28 } 29 }); 30 31 } 32} 33 34initEventosGoogle();
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.