1//setup before functions 2let myInput = document.getElementById("search"); 3 4$(document).ready(function () { 5 $("#search").keyup(function (e) { 6 if (e.keyCode === 27) { 7 $(".search-results-wrapper").empty(); 8 $(".search-reports-input").val(""); 9 $(".search-icon").show(); 10 $(".close-icon").hide(); 11 $(this).blur(); 12 } else if (e.keyCode === 13) { 13 let inputValue = myInput.value.trim(); 14 window.sessionStorage.setItem("searchParams", inputValue); 15 16 if (lang && lang !== "en") { 17 window.location.href = `/${lang}/search`; 18 } else { 19 window.location.href = "/search"; 20 } 21 // window.location.href = `/search?q=${inputValue}`; 22 } 23 }); 24 25 $(".search-results-wrapper").on("click", function (e) { 26 $("#search").focus(); 27 }); 28 29 // search active code 30 $(".open-search-button").on("click", function () { 31 $(".search-reports-input").show(); 32 $(".search-reports-input").focus(); 33 $(".search-icon").hide(); 34 $(".close-search-button").show(); 35 $(".close-icon").show(); 36 }); 37 38 // close search code 39 $(".close-search-button").on("click", function () { 40 $(".close-icon").hide(); 41 $(".search-results-wrapper").empty(); 42 $(".search-reports-input").val(""); 43 $(".search-icon").show(); 44 $(".search-reports-input").hide(); 45 $(".close-search-button").hide(); 46 }); 47 48 $(".close-search-input").on("click", function () { 49 $(".close-icon").hide(); 50 $(".search-results-wrapper").empty(); 51 $(".search-reports-input").val(""); 52 $(".search-icon").show(); 53 }); 54 55 $(".opacity-toggle").on("click", function () { 56 $(".close-icon").hide(); 57 $(".search-results-wrapper").empty(); 58 $(".search-reports-input").val(""); 59 $(".search-icon").show(); 60 }); 61 62 $("footer").on("click", function () { 63 $(".close-icon").hide(); 64 $(".search-results-wrapper").empty(); 65 $(".search-reports-input").val(""); 66 $(".search-icon").show(); 67 }); 68}); 69 70//user is "finished typing," do something 71function doneTyping() { 72 searchReports(document.getElementById("search").value); 73}
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.