1$(function () { 2 function searchStores(value, infokiosk) { 3 jQuery.ajax({ 4 type: "post", 5 dataType: "json", 6 url: myAjax.ajaxurl, 7 data: { 8 action: "searchStores", 9 value: value, 10 infokiosk: infokiosk, 11 }, 12 success: function (response) { 13 if (response.status == 200) { 14 $(".searchBarResults").html(response.html); 15 // console.log(infokiosk); 16 // notify('sukces', 'success'); 17 } else { 18 notify(response.msg, "error"); 19 } 20 }, 21 error: function (response) { 22 // console.error(response); 23 }, 24 }); 25 } 26 27 // Na zmianÄ inputa wywoÅanie treÅci 28 $("#searchBar").on("input", function () { 29 console.log("searchBar input"); 30 31 let value = $(this).val(); 32 console.log("searchBar value: ", value); 33 34 let infokiosk = ""; 35 const params = new URLSearchParams(window.location.search); 36 if (params) { 37 infokiosk = params.get("infokiosk"); 38 } 39 if (value.length > 1) { 40 fetch(value, infokiosk); 41 } else { 42 $(".searchBarResults").html(""); 43 } 44 }); 45 46 var typingTimer; 47 var doneTypingInterval = 2000; 48 49 let infokiosk = ""; 50 const params = new URLSearchParams(window.location.search); 51 if (params) { 52 infokiosk = params.get("infokiosk"); 53 } 54 function fetch(value, infokiosk) { 55 clearTimeout(typingTimer); 56 typingTimer = setTimeout( 57 searchStores(value, infokiosk), 58 doneTypingInterval 59 ); 60 } 61 62 let tempinputVal = ""; 63 64 // Dodanie eventu do przycisków 65 $(document).on("click", ".keyboard-key", function () { 66 let infokiosk = ""; 67 const params = new URLSearchParams(window.location.search); 68 if (params) { 69 infokiosk = params.get("infokiosk"); 70 } 71 72 const textInput = $("#searchBar"); 73 tempinputVal = textInput.val(); 74 let keyValue = $(this)[0].innerText; 75 let Btnfunction = $(this).data("function"); 76 77 if (Btnfunction == "submit") { 78 $("#searchBarInner").submit(); 79 } else if (Btnfunction == "remove") { 80 tempinputVal = tempinputVal.substring(0, tempinputVal.length - 1); 81 } else if (Btnfunction == "space") { 82 tempinputVal += " ";
83 } else { 84 tempinputVal += keyValue; 85 } 86 // Aktualizacja tekstu w inpucie 87 textInput.val(tempinputVal); 88 89 setTimeout(() => { 90 searchStores(textInput.val(), infokiosk); 91 }, 250); 92 }); 93});
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.