1document.addEventListener('DOMContentLoaded', function () { 2 function initSearchStatus(containerId, statusId) { 3 var container = document.getElementById(containerId); 4 if (!container) return; // Seite ohne diese Liste â nichts tun 5 var listEl = container.querySelector('.list'); 6 var status = document.getElementById(statusId); 7 if (!listEl || !status) return; 8 9 function updateStatus() { 10 var count = Array.prototype.filter.call(listEl.children, function (el) { 11 return el.style.display !== 'none'; // von List.js sichtbar gelassen = Treffer 12 }).length; 13 status.textContent = count === 0 14 ? 'Keine Einträge gefunden.' 15 : count + ' Einträge gefunden.'; 16 } 17 18 new MutationObserver(updateStatus).observe(listEl, { 19 attributes: true, 20 attributeFilter: ['style'], 21 subtree: true, 22 childList: true 23 }); 24 25 updateStatus(); // Initialstand beim Laden 26 } 27 28 initSearchStatus('employees', 'search-status-employees'); 29 initSearchStatus('politicians', 'search-status-politicians'); 30});
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.