1document.addEventListener('DOMContentLoaded', function() { 2 3 const filterForm = document.getElementById('prueftool-filter-form'); 4 5 if (filterForm) { 6 filterForm.addEventListener('submit', function(event) { 7 8 event.preventDefault(); 9 10 11 const searchTerm = document.getElementById('prueftool-filter-suchbegriff').value.toLowerCase().trim(); 12 13 14 const listItems = document.querySelectorAll('#element-list .prueftool-list-item'); 15 const statusText = document.getElementById('prueftool-filter-status'); 16 const noResultsMessage = document.getElementById('visual-no-results'); 17 18 let visibleCount = 0; 19 20 21 listItems.forEach(function(item) { 22 const itemText = item.textContent.toLowerCase(); 23 24 25 if (itemText.includes(searchTerm)) { 26 item.classList.remove('d-none'); 27 visibleCount++; 28 } else { 29 item.classList.add('d-none'); 30 } 31 }); 32 33 34 if (statusText) { 35 statusText.textContent = `${visibleCount} Elemente angezeigt.`; 36 } 37 38 39 if (noResultsMessage) { 40 if (visibleCount === 0) { 41 noResultsMessage.classList.remove('d-none'); 42 noResultsMessage.removeAttribute('aria-hidden'); 43 } else { 44 noResultsMessage.classList.add('d-none'); 45 noResultsMessage.setAttribute('aria-hidden', 'true'); 46 } 47 } 48 }); 49 } 50});
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.