PageSourceSearch

https://www.lereveildumidi.fr/media/templates/site/smartoweb4/js/bodybottom.js?debug003

js lereveildumidi.fr collected 2026-10-02 07:20:43 UTC 3,384 bytes, 124 lines download raw bytes

1
2(function ($) {
3    
4
5    let topmenu, scrolltop, resp, mess;
6    
7    $(window).on('load', function () {
8    
9topmenu=$('body>header .menucol')[0]; 
10        scrolltopEl=$('#scrolltop')[0]; 
11        
12        resp=$('div.mainmenu')[0]; 
13     
14        $('.mainmenurespicon.open').click(function(){
15            $(resp).addClass('resp_displayed');
16        });
17    
18        $('.mainmenurespicon.close').click(function(){
19            $(resp).removeClass('resp_displayed');
20        });
21
22        $('.copyfeed').click(copytocb); 
23      
24        onWindowResize();
25        $(window).resize(function () {
26            onWindowResize();
27        });
28      
29        if(window.location.hash) {
30            relativeScroll();
31        }
32
33        // scrolltop
34        let io_scrolltop = new IntersectionObserver(io_scrolltop_cbk, {root: null,rootMargin:'0px 0px 85% 0px',threshold: 1});
35        io_scrolltop.observe($('#io_sentinel')[0]);
36        
37        // system message
38        mess=$('div#system-message');
39        if(mess.length>0){
40            window.setInterval(closeMessage, 6000);
41        }
42        
43
44        $("a").on('click', function(event) {
45            if (this.hash !== "") {
46            event.preventDefault();
47            $('html, body').animate({scrollTop: $(this.hash).offset().top}, 800, function(){});}
48        });   
49        
50    });
51
52
53    function closeMessage(){
54       $(mess).empty();
55       $(mess).css({opacity:0});
56    };
57
58
59    // scrolltop function
60    function io_scrolltop_cbk(entries, observer) { 
61        let display=$(scrolltopEl).css('display');
62        entries.forEach(entry => {
63            if(entry.boundingClientRect.y<0 && display==='none'){
64                $(scrolltopEl).css('display', 'block');
65            }else if(entry.boundingClientRect.y>=0 && display==='block'){
66                $(scrolltopEl).css('display','none');
67            }
68        });
69    };
70
71    function onWindowResize() { 
72        footerBottom();
73        responsiveMode();
74    };
75    
76    function responsiveMode() { 
77        $('body').css('padding-top',$('body>header').height());
78        if($( window ).width()>=1183 ){
79            if($(resp).hasClass('resp_enabled')){
80                $(resp).removeClass('resp_enabled resp_displayed');
81            }
82        }else{
83            $(resp).addClass('resp_enabled');
84        }
85
86    };  
87    
88    function footerBottom() {
89        let f = $('body>footer');
90        f.css({position: 'relative'});
91        if (f.offset().top + f.height() < $(window).height()) {
92            f.css({position: 'fixed', bottom: '0', width: '100%'});
93        }
94        f.css({display:'block'});
95    }
96    
97        function copytocb(e) {
98            let el = $(e.target).closest('.feed')[0];
99            let rl = $(el).find('.rsslink')[0];
100            let t = $(rl).text();
101
102            var $temp = $("<input>");
103            $("body").append($temp);
104            $temp.val(t).select();
105            document.execCommand('copy');
106            $temp.remove();
107
108            var em = $(e.target).closest('.copyfeed').find('span')[0];
109            $(em).css('opacity', 1);
110            window.setTimeout(closeMessage, 3000, em);
111        }
112
113        function closeMessage(em) {
114            $(em).css('opacity', 0);
115        }
116        
117
118    
119})(jQuery);
120
121
122
123
124

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.