PageSourceSearch

https://www.uebergewicht-vorbeugen.de/_assets/19e6d36a06dfe5830403e4a2863c017e/Js/matomo.js?1790662474

js uebergewicht-vorbeugen.de collected 2026-10-02 05:31:06 UTC 5,913 bytes, 171 lines download raw bytes

1function ww_bzga_matomo_embedTrackingCode() {
2    var u = "https://piwik.bzga.de/";
3    window._paq = window._paq || [];
4    window._paq.push(['setTrackerUrl', u + 'piwik.php']);
5    var d = document,
6        g = d.createElement("script"),
7        s = d.getElementsByTagName("script")[0];
8    g.type = "text/javascript";
9    g.defer = true;
10    g.async = true;
11    g.src = u + "piwik.js";
12    s.parentNode.insertBefore(g, s);
13}
14
15function ww_bzga_matomo_getCookie(cname) {
16    var name = cname + "=";
17    var decodedCookie = decodeURIComponent(document.cookie);
18    var ca = decodedCookie.split(';');
19    for (var i = 0; i < ca.length; i++) {
20        var c = ca[i];
21        while (c.charAt(0) == ' ') {
22            c = c.substring(1);
23        }
24        if (c.indexOf(name) == 0) {
25            return c.substring(name.length, c.length);
26        }
27    }
28    return "";
29}
30
31function ww_bzga_matomo_setCookie(name, value, expiryDays, domain, path) {
32    expiryDays = parseInt(expiryDays) || 365;
33    var exdate = new Date();
34    exdate.setDate(exdate.getDate() + expiryDays);
35    var cookie = [
36        name + '=' + value,
37        'expires=' + exdate.toUTCString(),
38        'path=' + (path || '/'),
39        'SameSite=Lax',
40        'secure=true'
41    ];
42    if (domain) cookie.push('domain=' + domain);
43    if (value == 0) cookie.push('max-age=0');
44    document.cookie = cookie.join(';');
45}
46
47function ww_bzga_matomo_set_optout(v, expiryDays) {
48    expiryDays = parseInt(expiryDays);
49    if (expiryDays < 1) expiryDays = 365;
50    ww_bzga_matomo_setCookie("ww_bzga_matomo_optout", v, expiryDays, document.domain, "/");
51}
52
53function ww_bzga_matomo_set_moreinfo() {
54
55        var is_expanded = document.getElementById("cookiebanner_button_moreinfo").getAttribute("aria-expanded");
56
57
58        if (is_expanded == "true") {
59
60            document.getElementById("cookiebanner_description_moreinfo").style.display = "none";
61            document.getElementById("cookiebanner_button_moreinfo").setAttribute("aria-expanded", "false");
62        } else {
63            document.getElementById("cookiebanner_description_moreinfo").style.display = "block";
64            document.getElementById("cookiebanner_button_moreinfo").setAttribute("aria-expanded", "true");
65        }
66
67}
68
69
70function ww_bzga_matomo_init() {
71
72    var hide = ww_bzga_matomo_getCookie("ww_bzga_matomo_cookiebanner_hide");
73
74    if (hide != 1) {
75        document.getElementById("ww_bzga_matomo_cookiebanner").style.display = "block";
76    }else{
77        document.getElementById("ww_bzga_matomo_cookiebanner").style.display = "none";
78    }
79
80    var optout = ww_bzga_matomo_getCookie("ww_bzga_matomo_optout");
81    if (optout != 1 && hide == 1) ww_bzga_matomo_embedTrackingCode();
82
83    var ww_bzga_matomoElements = document.querySelectorAll(".ww_bzga_matomo");
84    ww_bzga_matomoElements.forEach(function (element) {
85        element.style.display = "block";
86        if (optout == 1) {
87            element.querySelector(".optout_yes").style.display = "block";
88            element.querySelector(".optout_no").style.display = "none";
89        } else {
90            element.querySelector(".optout_no").style.display = "block";
91            element.querySelector(".optout_yes").style.display = "none";
92        }
93        var expire = element.dataset.expire;
94
95        element.querySelector(".set_optout_yes").addEventListener("click", function () {
96            ww_bzga_matomo_set_optout(1, expire);
97            location.reload();
98        });
99        element.querySelector(".set_optout_no").addEventListener("click", function () {
100            ww_bzga_matomo_set_optout(0, expire);
101            location.reload();
102        });
103
104
105
106
107    });
108
109    var ww_bzga_matomoBannerElements = document.querySelectorAll("#ww_bzga_matomo_cookiebanner");
110
111
112    ww_bzga_matomoBannerElements.forEach(function (element) {
113
114        var expire = element.dataset.expire;
115        element.querySelector(".button-allow").addEventListener("click", function () {
116            ww_bzga_matomo_set_optout(0, expire);
117            ww_bzga_matomo_setCookie("ww_bzga_matomo_cookiebanner_hide", 1, expire, document.domain, "/");
118            location.reload();
119
120        });
121
122        element.querySelector(".button-deny").addEventListener("click", function () {
123            ww_bzga_matomo_set_optout(1, expire);
124            ww_bzga_matomo_setCookie("ww_bzga_matomo_cookiebanner_hide", 1, expire, document.domain, "/");
125
126            location.reload();
127
128        });
129
130        element.querySelector(".button-moreinfo").addEventListener("click", function () {
131            ww_bzga_matomo_set_moreinfo();
132        });
133
134
135    });
136
137
138
139}
140
141document.addEventListener("DOMContentLoaded", function () {
142    ww_bzga_matomo_init();
143});
144
145var configElement = document.querySelector('.ww_bzga_matomo_config');
146
147// Get the value of the data-matomoSiteId attribute
148var matomoSiteId = configElement.getAttribute('data-matomoSiteId');
149var matomoDownloadClasses = configElement.getAttribute('data-matomoDownloadClasses');
150var matomoTrackPageView = configElement.getAttribute('data-matomoTrackPageView');
151var matomoLinkTracking = configElement.getAttribute('data-matomoTrackPageView');
152var matomoHeartBeatTimer = configElement.getAttribute('data-matomoHeartBeatTimer');
153
154if(matomoSiteId && ww_bzga_matomo_getCookie("ww_bzga_matomo_cookiebanner_hide") == 1 && ww_bzga_matomo_getCookie("ww_bzga_matomo_optout") != 1) {
155    var _paq = _paq || [];
156    _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
157    _paq.push(["disableCookies"]);
158    _paq.push(["setSiteId", matomoSiteId]);
159    if(matomoDownloadClasses) {
160        _paq.push(["setDownloadClasses", matomoDownloadClasses]);
161    }
162    if(matomoTrackPageView) {
163        _paq.push(["trackPageView"]);
164    }
165    if(matomoLinkTracking) {
166        _paq.push(["enableLinkTracking"]);
167    }
168    if(matomoHeartBeatTimer) {
169        _paq.push(["enableHeartBeatTimer", matomoHeartBeatTimer]);
170    }
171}

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.