PageSourceSearch

https://www.arbeitsinspektion.gv.at/.resources/bcisa-ai/resources/…ndortsuche~2026-09-14-15-04-10-538~cache.js

js arbeitsinspektion.gv.at collected 2026-09-24 18:15:17 UTC 1,891 bytes, 54 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2  const filterForm = document.getElementById('filter-form');
3  const selectBL = document.getElementById('filter-bundesland');
4  const inputPLZ = document.getElementById('filter-plz');
5  const listItems = document.querySelectorAll('#element-list li');
6  const statusText = document.getElementById('filter-status');
7  const visualNoResults = document.getElementById('visual-no-results');
8
9  if (!filterForm || !selectBL || !inputPLZ || !statusText || !visualNoResults) {
10    return;
11  }
12
13  const totalCount = listItems.length;
14
15  function filterList() {
16    const valBL = selectBL.value;
17    const valPLZ = inputPLZ.value.trim();
18    let visibleCount = 0;
19    const isFilterActive = valBL !== "" || valPLZ !== "";
20
21    listItems.forEach(item => {
22      const rawBL = item.getAttribute('data-bundesland') || '';
23      const rawPLZ = item.getAttribute('data-plz') || '';
24
25      const itemBLArray = rawBL.split(';').map(val => val.trim().toLowerCase());
26      const itemPLZArray = rawPLZ.split(';').map(val => val.trim());
27
28      const matchBL = valBL === "" || itemBLArray.includes(valBL.toLowerCase());
29      const matchPLZ = valPLZ === "" || itemPLZArray.some(plz => plz.startsWith(valPLZ));
30
31      if (matchBL && matchPLZ) {
32        item.classList.remove('d-none');
33        visibleCount++;
34      } else {
35        item.classList.add('d-none');
36      }
37    });
38
39    if (visibleCount === 0 && isFilterActive && totalCount > 0) {
40      statusText.textContent = "Keine passenden Elemente für diese Auswahl gefunden.";
41      visualNoResults.classList.remove('d-none');
42    } else {
43      statusText.textContent = `${visibleCount} Element(e) angezeigt.`;
44      visualNoResults.classList.add('d-none');
45    }
46  }
47
48  filterForm.addEventListener('submit', function(event) {
49    event.preventDefault();
50    filterList();
51  });
52
53  filterList();
54});

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.