PageSourceSearch

https://cll-info.de/wp-content/themes/salient-child/js/redesign.js

js cll-info.de collected 2026-10-04 21:18:14 UTC 4,142 bytes, 113 lines download raw bytes

1(function($){
2    console.log('rdy');
3
4    $('.nectar-post-grid-item').each(function() {
5        var $gridItem = $(this);
6        var $metaWrap = $gridItem.find('.nectar-post-grid-item__meta-wrap');
7        var $metaCategory = $gridItem.find('.meta-category');
8        
9        $metaCategory.before($metaWrap);
10    });
11
12    $(document).on('mouseenter', 'li.slide-out-widget-area-toggle.small a', function(e){
13        $(this).unbind('mouseenter').unbind('mouseleave');
14        console.log('mouseover nav')
15        e.preventDefault();
16        e.stopPropagation();
17    })
18
19    waitForElement('li.slide-out-widget-area-toggle.small a', function(el){
20        console.log('el found', el)
21        $(el).unbind('mouseenter');
22        $(el).unbind('mouseleave');
23    })
24
25    function waitForElement(selector, callback) {
26        var checkExist = setInterval(function() {
27            var el = $(selector);
28            if (el.length) {
29                clearInterval(checkExist);
30                callback(el);
31            }
32        }, 100); // Check every 100ms
33    }
34
35    $(document).on('click', '.off-canvas-menu-container li, .off-canvas-menu-container .fa-angle-down', function(e){
36        console.log($('.off-canvas-menu-container .current-menu-parent'))
37        $('.off-canvas-menu-container .current-menu-parent').removeClass('current-menu-parent');
38    });
39
40    $(document).on('click', '.off-canvas-menu-container li, .off-canvas-menu-container span, .off-canvas-menu-container i', function(e){
41        console.log(e.target.nodeName)
42        switch(e.target.nodeName){
43            case 'LI':
44                $(this).find('>span').trigger('click')
45            break;
46
47            case 'A':
48                console.log($(e.target).siblings('span').trigger('click'));
49            break;
50        }
51    })
52    $(document).on('click', '.video-carousel-nav .carousel-item-thumb iframe', function(e){
53            e.preventDefault();
54        });
55    $(document).on('click', '.video-carousel .carousel-item video', function(){
56        if (this.paused) {
57            this.play();
58        } else {
59            this.pause();
60        }
61    });
62
63    $('.post-content-wrapper').prepend($('body.single #breadcrumbs'));
64
65    // Funktion zur Berechnung der vertikalen Distanz
66    function getVerticalDistanceBetweenElements($el1, $el2) {
67        const rect1 = $el1[0].getBoundingClientRect();
68        const rect2 = $el2[0].getBoundingClientRect();
69
70        // Verwende die untere Grenze von el1 und die obere Grenze von el2
71        return rect2.top - rect1.bottom;
72    }
73
74    $(window).on('scroll', () => {
75        // Berechne die Distanz zwischen Sticky-Element und Footer
76        const $stickyElement1 = $('.omsag-sticky-wrapper.sticky1');
77        const $stickyElement2 = $('.omsag-sticky-wrapper.sticky2');
78        const $footer = $('#footer-outer');
79
80        $stickyElement1.css('bottom', `${220 + getVisiblePixels($footer)}px`);
81        $stickyElement2.css('bottom', `${50 + getVisiblePixels($footer)}px`);
82
83    });
84
85    function getVisiblePixels($element) {
86        const rect = $element[0].getBoundingClientRect();
87        const windowHeight = $(window).height();
88    
89        if (rect.bottom < 0 || rect.top > windowHeight) {
90            // Das Element ist komplett außerhalb des Sichtfelds
91            return 0;
92        } else if (rect.top >= 0 && rect.bottom <= windowHeight) {
93            // Das Element ist komplett sichtbar
94            return rect.height;
95        } else {
96            // Teilweise sichtbar
97            const visibleTop = Math.max(0, rect.top);
98            const visibleBottom = Math.min(windowHeight, rect.bottom);
99            return visibleBottom - visibleTop;
100        }
101    }
102
103
104    window.setTimeout(function(){
105        console.log('pld-count', $('.pld-like-trigger + .pld-like-count-wrap').text().trim());
106
107        if($('.pld-like-trigger + .pld-like-count-wrap').text().trim() === '0'){
108            $('.pld-like-trigger img').attr('src', '/wp-content/uploads/2025/04/btn-ichfinde.png').css({"margin-top": "20px", "max-width": "300px !important"});
109            $('.pld-like-count-wrap').hide();
110        }
111    }, 1000);
112
113})(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.