PageSourceSearch

https://vavecasinoholland.nl/js/faq-accordion.js?v=20260826-faq-all1

js vavecasinoholland.nl collected 2026-10-04 10:54:17 UTC 2,146 bytes, 66 lines download raw bytes

1(() => {
2  const faqHeadingPattern = /faq|frequently\s+asked\s+questions|preguntas\s+frecuentes|domande/i;
3
4  const prepareItem = (item) => {
5    item.classList.add("ui-faq-item");
6    item.open = false;
7    item.removeAttribute("open");
8
9    const summary = item.querySelector(":scope > summary");
10    if (!summary) return;
11
12    const syncState = () => {
13      summary.setAttribute("aria-expanded", item.open ? "true" : "false");
14    };
15
16    syncState();
17    if (item.dataset.faqBound !== "true") {
18      item.dataset.faqBound = "true";
19      item.addEventListener("toggle", syncState);
20    }
21  };
22
23  document.querySelectorAll(".ui-pin-sec").forEach((section) => {
24    const heading = Array.from(section.children).find((child) =>
25      child.matches("h2") && faqHeadingPattern.test(`${child.id} ${child.textContent}`)
26    );
27
28    if (!heading) return;
29
30    section.classList.add("ui-faq-sec");
31
32    section.querySelectorAll(":scope > details").forEach(prepareItem);
33
34    const questions = Array.from(section.children).filter((child) => child.matches("h3"));
35    questions.forEach((question, index) => {
36      const nextQuestion = questions[index + 1] || null;
37      const details = document.createElement("details");
38      const summary = document.createElement("summary");
39      const summaryHeading = document.createElement("span");
40
41      details.className = "ui-faq-item";
42      if (question.id) details.id = question.id;
43
44      summaryHeading.setAttribute("role", "heading");
45      summaryHeading.setAttribute("aria-level", "3");
46      summaryHeading.textContent = question.textContent.trim();
47      summary.append(summaryHeading);
48      details.append(summary);
49      section.insertBefore(details, question);
50
51      let sibling = question.nextSibling;
52      question.remove();
53      while (sibling && sibling !== nextQuestion) {
54        const followingSibling = sibling.nextSibling;
55        details.append(sibling);
56        sibling = followingSibling;
57      }
58
59      prepareItem(details);
60    });
61  });
62
63  window.addEventListener("pageshow", () => {
64    document.querySelectorAll(".ui-faq-sec > details").forEach(prepareItem);
65  });
66})();

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.