PageSourceSearch

https://pizza-laperla.at/main/views/themes/kellner4you-modern/js/cookiepopup.js

js pizza-laperla.at collected 2026-10-02 01:16:15 UTC 3,462 bytes, 88 lines download raw bytes

1(function ( $ ) {
2    "use strict";
3
4    const cookiePopupHtml = '<div id="cookie-popup-container">' +
5        '<div class="cookie-popup" style="display: none;">' +
6            '<div class="cookie-popup-inner">' +
7                '<div class="cookie-popup-left">' +
8                    '<div class="cookie-popup-headline">Diese Webseite verwendet Cookies.</div>' +
9                    '<div class="cookie-popup-sub-headline">Durch das Nutzen dieser Seite sind Sie mit der Verwendung von Cookies einverstanden.</div>' +
10                '</div>' +
11
12                '<div class="cookie-popup-right">' +
13                    '<a href="#" class="cookie-popup-accept-cookies">OK</a>' +
14                    '<a href="#" class="cookie-popup-learn-more">Weitere Informationen!</a>' +
15                '</div>' +
16            '</div>' +
17        '</div>' +
18    '</div>';
19
20    var onAccept;
21
22    $.extend({
23        acceptCookies : function(options) {
24            var cookiesAccepted = getCookie("cookiesAccepted");
25
26            if (!cookiesAccepted) {
27                var cookiePopup = $(cookiePopupHtml);
28                var position = "bottom";
29
30                if(options != undefined) {
31                    position = options.position != undefined ? options.position : "bottom";
32
33                    if(options.title != undefined)
34                        cookiePopup.find('.cookie-popup-headline').text(options.title);
35                    if(options.text != undefined)
36                        cookiePopup.find('.cookie-popup-sub-headline').text(options.text);
37                    if(options.acceptButtonText != undefined)
38                        cookiePopup.find(".cookie-popup-accept-cookies").text(options.acceptButtonText);
39                    if(options.learnMoreButtonText != undefined)
40                        cookiePopup.find(".cookie-popup-learn-more").text(options.learnMoreButtonText);
41                    if(options.theme != undefined)
42                        cookiePopup.addClass("theme-" + options.theme);
43                    if(options.onAccept != undefined)
44                        onAccept = options.onAccept;
45
46                    if(options.learnMore != undefined) {
47                        cookiePopup.find(".cookie-popup-learn-more").attr('href', options.learnMore);
48                    }
49
50                }
51                
52                cookiePo
52pup.find('.cookie-popup').addClass("position-" + position);
53                $('body').append(cookiePopup);
54                $('.cookie-popup').slideToggle();
55            }    
56        }
57    });
58
59    $(document).on('click', '.cookie-popup-accept-cookies', function(e) {
60        e.preventDefault();
61        saveCookie();
62        $('.cookie-popup').slideToggle();        
63        if (typeof onAccept === "function")
64            onAccept();
65    });
66
67    function getCookie(cname) {
68        var name = cname + "=";
69        var decodedCookie = decodeURIComponent(document.cookie);
70        var ca = decodedCookie.split(';');
71        for (var i = 0; i < ca.length; i++) {
72            var c = ca[i];
73            while (c.charAt(0) == ' ') {
74                c = c.substring(1);
75            }
76            if (c.indexOf(name) == 0) {
77                return c.substring(name.length, c.length);
78            }
79        }
80        return "";
81    }
82
83    function saveCookie() {        
84        var expires = "expires=01/01/2099"
85        document.cookie = "cookiesAccepted=true; " + expires + "; path=/";
86    }
87 
88}( jQuery ));

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.