PageSourceSearch

https://vailux.de/themen/standard/js/dsgvo-button.js

js vailux.de collected 2026-10-06 18:10:26 UTC 1,111 bytes, 28 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2    const banner = document.getElementById("cookie-banner");
3    const acceptBtn = document.getElementById("accept-cookies");
4    const declineBtn = document.getElementById("decline-cookies");
5
6    // Prüfen, ob der Nutzer schon gewählt hat
7    if (!localStorage.getItem("cookieConsent")) {
8        banner.style.display = "flex";
9    }
10
11    // Bei Klick auf Akzeptieren
12    acceptBtn.addEventListener("click", function() {
13        localStorage.setItem("cookieConsent", "accepted");
14        banner.style.display = "none";
15        // Hier könntest du Tracking-Skripte wie Google Analytics initialisieren
16        console.log("Cookies akzeptiert");
17    });
18
19    // Bei Klick auf Ablehnen
20    declineBtn.addEventListener("click", function() {
21        localStorage.setItem("cookieConsent", "declined");
22        banner.style.display = "none";
23        console.log("Cookies abgelehnt");
24    });
25});
26document.getElementById("open-cookie-settings").addEventListener("click", function() {
27    document.getElementById("cookie-banner").style.display = "flex";
28});

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.