PageSourceSearch

https://www.lindenberg.de/typo3conf/ext/stadt_lindenberg/Resources…/JavaScript/2Klick/2click.js?1739974574

js lindenberg.de collected 2026-10-02 16:43:31 UTC 4,233 bytes, 103 lines download raw bytes

1/*!
2 * TwoClickPrivacy v0.1
3 * Licensed MIT © 2019 Florian Boos
4 *
5 * Based on 2Click-Iframe-Privacy v0.1.0 by Michael Lorer - https://www.01-scripts.de/
6 */
7
8var TwoClickPrivacy = new function() {
9
10    this.types = new Array({
11	   type: 'video',
12	   class: 'privacy-video',
13	   description: 'Zum Aktivieren des Videos bitte auf den Link klicken. Durch das Aktivieren von eingebetteten Videos werden Daten an den jeweiligen Anbieter übermittelt und es werden Cookies gesetzt. Weitere Informationen können unserer <a href="/datenschutz">Datenschutzerklärung</a> entnommen werden.<br />'
14    }, {
15	   type: 'map',
16	   class: 'privacy-map',
17	   description: 'Zum Aktivieren der eingebetteten Karte bitte auf den Link klicken. Durch das Aktivieren werden Daten an Openstreetmaps übermittelt und es werden Cookies gesetzt. Weitere Informationen können unserer <a href="/datenschutz">Datenschutzerklärung</a> und der <a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy" target="_blank">Datenschutzerklärung</a> von Openstreetmaps entnommen werden.<br />'
18    }, {
19	   type: 'script',
20	   class: 'privacy-script',
21	   description: 'Zum Aktivieren des eingebetteten Skript bitte auf den Link klicken. Durch das Aktivieren werden Daten an Landsichten.de übermittelt. Weitere Informationen können unserer <a href="/datenschutz">Datenschutzerklärung</a> entnommen werden.<br />'
22    });
23
24
25    function wrap(el, wrapper, type, selclass, text) {
26        el.parentNode.insertBefore(wrapper, el);
27        wrapper.className = 'privacy-msg ' + selclass + '-msg';
28        //wrapper.style.width = el.clientWidth+'px';
29        //wrapper.style.height = el.clientHeight+'px';
30        wrapper.innerHTML = '<p>' + text + '<a class="btn" href="#foo" onclick="TwoClickPrivacy.EnableContent(\'' + type + '\', \'' + selclass + '\', \'' + el.id + '\'); return false;">Inhalt anzeigen</a></p>';
31        wrapper.appendChild(el);
32    }
33
34    this.EnableContent = function(type, selclass, id) {
35
36        if (document.getElementById(id)) {
37            var element = document.getElementById(id);
38            element.parentNode.removeChild(element.parentNode.children[0]);
39            element.src = element.getAttribute('data-src');
40            if (selclass == "privacy-script") {
41                getOwnScript();
42            }
43        } else {
44
45            var x = document.querySelectorAll('div.' + selclass + '-msg p');
46            var i;
47            for (i = 0; i < x.length; i++) {
48                x[i].parentNode.removeChild(x[i]);
49            }
50
51            x = document.querySelectorAll('div.' + selclass + '-msg');
52            for (i = 0; i < x.length; i++) {
53                var parent = x[i].parentNode;
54
55                // Move all children out of the element
56                while (x[i].firstChild) parent.insertBefore(x[i].firstChild, x[i]);
57
58                // Remove the empty element
59                parent.removeChild(x[i]);
60            }
61
62            x = document.getElementsByClassName(selclass);
63
64            for (i = 0; i < x.length; i++) {
65                x[i].src = x[i].getAttribute('data-src');
66
67                // Insert own Script to Load
68                if (selclass == "privacy-script") {
69                    getOwnScript();
70                }
71
72            }
73        }
74    }
75
76    this.init = function(Userconfig) {
77
78        if (Array.isArray(Userconfig.CustomTypes)) {
79            this.types = Userconfig.CustomTypes;
80        }
81
82        for (i = 0; i < this.types.length; i++) {
83            var selector = document.getElementsByClassName(this.types[i].class);
84            var x;
85            for (x = 0; x < selector.length; x++) {
86                wrap(selector[x], document.createElement('div'), this.types[i].type, this.types[i].class, this.types[i].description);
87            }
88
89        }
90
91    };
92
93    /* Add own Script here */
94    function getOwnScript() {
95        if (!document.head.querySelector('script[data-id=eobp]')) {
96            var script = document.createElement('script');
97            script.src = 'https://belegungskalender.api.eberl-online.net/v1/bundle.js';
98            script.async = true;
99            script.setAttribute('data-id', 'eobp');
100            document.head.appendChild(script);
101        }
102    }
103}

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.