PageSourceSearch

https://www.schreiben-als-bruecke.de/_assets/6020ad64298e304d8b844…/Optional/cookiebot.js?1781793979

js schreiben-als-bruecke.de collected 2026-10-09 01:53:02 UTC 2,057 bytes, 70 lines download raw bytes

1/**
2 * push consents to global variables
3 */
4const cbconsents = {
5    necessary: false,
6    preferences: false,
7    statistics: false,
8    marketing: false,
9};
10// wait for initialized Cookiebot-object and push consents to global object cbconsents
11const initCookiebotConsents = new Promise((resolve, reject) => {
12    window.addEventListener('CookiebotOnLoad', function () {
13        if (Cookiebot) {
14            cbconsents.necessary = Cookiebot.consent.necessary;
15            cbconsents.preferences = Cookiebot.consent.preferences;
16            cbconsents.statistics = Cookiebot.consent.statistics;
17            cbconsents.marketing = Cookiebot.consent.marketing;
18
19            if(cbconsents.preferences){
20                ajaxContent('.loadOnCookiePref');
21            }
22            if(cbconsents.statistics){
23                ajaxContent('.loadOnCookieStat');
24            }
25            if(cbconsents.marketing){
26                ajaxContent('.loadOnCookieMark');
27            }
28
29            resolve('CookiebotOnLoad');
30        }
31        reject('Cookiebot not initialized');
32    })
33})
34
35// get consent from global object and do something, when promise is resolved
36initCookiebotConsents.then(function (e){
37    // e.g. if(cbconsents.preferences){ do something}
38})
39
40
41/****************** Cookiebot Params *******************/
42function getQueryParams() {
43    if (document.body.classList.contains('no-cookiebot')) {
44        return true;
45    }
46}
47
48var onlyOnce = true;
49window.addEventListener('CookiebotOnDialogDisplay', function () {
50    /** Hide cookiebot on Impressum and Datenschutz pages **/
51    if (getQueryParams() && onlyOnce) {
52        Cookiebot.hide();
53        onlyOnce = false;
54    }
55});
56
57/**
58 * click event handler add if for each click event
59 */
60document.addEventListener('click', function (event) {
61    if (event.target.closest('.cb-renew')) {
62        event.preventDefault();
63        onlyOnce = false;
64        Cookiebot.renew();
65    }
66    if (event.target.closest('.cb-withdraw')) {
67        event.preventDefault();
68        Cookiebot.withdraw();
69    }
70}, false);

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.