https://www.tuebus.de/_assets/1ca1c6b546340bc6f2fbefedd326d38e/JavaScript/ListPlatform.js?1790986258
1const platformSearchForm = document.getElementById('searchPlatformForm'); 2 3if (platformSearchForm) { 4 platformSearchForm.addEventListener('submit', (e) => { 5 e.preventDefault(); 6 searchResult(); 7 }) 8 let inputField = platformSearchForm.querySelector('#searchPlatformText'); 9 if(inputField) { 10 inputField.addEventListener('input', function() { 11 const query = this.value; 12 if (query.length >= 2 || query.length===0) { 13 searchResult(); 14 } 15 }); 16 } 17} 18 19function searchResult() { 20 const loader = document.getElementById('platform-loding'); 21 const request = new XMLHttpRequest(); 22 const formData = new FormData(platformSearchForm); 23 const actionURL = platformSearchForm.getAttribute('action'); 24 loader.classList.remove('d-none'); 25 const parser = new DOMParser(); 26 request.open("POST", actionURL, true); 27 request.onreadystatechange = function () { 28 if (request.readyState === XMLHttpRequest.DONE) { 29 const responseText = request.responseText; 30 const parsedHTML = parser.parseFromString(responseText, 'text/html'); 31 const responsePlatformData = parsedHTML.getElementById('productListing') 32 document.getElementById('productListing').innerHTML = responsePlatformData.innerHTML; 33 } 34 loader.classList.add('d-none'); 35 }; 36 request.send(formData); 37}
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.