PageSourceSearch

https://saintbenezet.fr/themes/public/assets/js/app.js?v=2.3.5

js saintbenezet.fr collected 2026-10-03 01:50:05 UTC 7,075 bytes, 216 lines download raw bytes

1(function($){
2   $.fn.lazyload = function(){
3      $(window).scroll(lazyload);
4      lazyload();
5   }
6
7   function lazyload(){
8      var winScrollTop = $(window).scrollTop();
9      var winHeight = $(window).height();
10
11      $('img.lazy').each(function(){
12         var imgOTop = $(this).offset().top;
13
14         if(imgOTop < (winHeight + winScrollTop)){
15            $(this)
16               .attr('src', $(this).data('src'))
17               .removeClass('lazy')
18               .removeAttr('data-src');
19         }
20      });
21   }
22})(jQuery);
23
24
25$(document).ready(function () {
26	//Lazyload
27	$(document).lazyload();
28
29	//Share
30    $(".popup-share").on('click', function (e) {
31        e.preventDefault();
32        window.open($(this).attr("href"), "fbShareWindow", "height=450, width=550, top=" + ($(window).height() / 2 - 275) + ", left=" + ($(window).width() / 2 - 225) + ", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");
33        return false;
34    });
35	//Tooltip
36    $('[data-toggle="tooltip"]').tooltip();
37
38    //Favoris
39    $('.favoris_click').on('click', function () {
40		var id 			= $(this).data('id');
41		var module 		= $(this).data('module');
42        if(id > 0 && module != '') {
43			$.ajax({
44				url: host_url + "ajax/favorites",
45				type: 'GET',
46				dataType: "json",
47				data: {
48					module	: module,
49					id 		: id
50				},
51				success: function (data) {
52					if (data.status == 1) {
53						$('#favoris_'+module+'_'+id).addClass('fas').removeClass('fal').addClass('fa-active');
54                        clignotement(module);
55
56					} else if (data.status == 2) {
57                        $('#favoris_'+module+'_'+id).addClass('fal').removeClass('fas').removeClass('fa-active');
58                        clignotement(module);
59					}
60				}
61			});
62		}
63    });
64	//Confirm
65	$('a[data-confirm]').click(function(ev) {
66        var href = $(this).attr('href');
67        if(!$('#dataConfirmModal').length) {
68            $('body').append('<div id="dataConfirmModal" class="modal" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"></div></div></div>');
69        }
70        $('#dataConfirmModal').find('.modal-content').html('<div class="modal-header bg-danger"><h5 class="m-0 text-white" id="dataConfirmLabel">Merci de confirmer</h5></div><div class="modal-body"></div><div class="modal-footer"><button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Non</button><a class="btn btn-success float-right margin-5" id="dataConfirmOK">Oui</a></div></div>');
71        $('#dataConfirmModal').find('.modal-body').text($(this).attr('data-confirm'));
72		$('#dataConfirmOK').attr('href', href);
73        $('#dataConfirmModal').modal({show:true});
74        return false;
75    });
76	//OwlCarousel
77	if($('.owl-carousel').length > 0) {
78		$('.owl-carousel').each(function() {
79			var autoHeight 	= (typeof $(this).data("auto-height") !== 'undefined') ? $(this).data("auto-height") : false;
80			var slide_xl 	= (typeof $(this).data("slide-xl") !== 'undefined') ? $(this).data("slide-xl") : 1;
81			var slide_lg   	= (typeof $(this).data("slide-lg") !== 'undefined') ? $(this).data("slide-lg") : 1;
82			var slide_md 	= (typeof $(this).data("slide-md") !== 'undefined') ? $(this).data("slide-md") : 1;
83			var slide_sm 	= (typeof $(this).data("slide-sm") !== 'undefined') ? $(this).data("slide-sm") : 1;
84			var loop 		= (typeof $(this).data("loop") !== 'undefined') ? $(this).data("loop") : true;
85			var margin 		= (typeof $(this).data("margin") !== 'undefined') ? $(this).data("margin") : 20;
86			var dots 		= (typeof $(this).data("dots") !== 'undefined') ? $(this).data("dots") : false;
87			var speed 		= (typeof $(this).data("speed") !== 'undefined') ? $(this).data("speed")*1000 : 2000;
88
89			$(this).owlCarousel( {
90				loop				: loop,
91				margin				: margin,
92				dots				: dots,
93				autoplay			: true,
94				autoplayTimeout 	: speed,
95				autoplayHoverPause	: true,
96				autoHeight			: autoHeight,
97				onInitialized		: setOwlStageHeight,
98				onResized			: setOwlStageHeight,
99				onTranslated		: setOwlStageHeight,
100				responsiveClass		: true,
101				responsive			: {
102					0:{
103						items: slide_sm,
104					},
105				    768:{
106						items: slide_md,
107					},
108					992:{
109						items: slide_lg,
110					},
111					1200:{
112						items: slide_xl,
113					}
114				}
115			});
116		 })
117	}
118
119    function setOwlStageHeight(event) {
120        var maxHeight  = 0;
121        var heightGood = 0;
122        $('.owl-item.active').each(function () { // LOOP THROUGH ACTIVE ITEMS
123            var thisHeight = parseInt( $(this).height() );
124            maxHeight=(maxHeight>=thisHeight?maxHeight:thisHeight);
125			heightGood = maxHeight + 20
126        });
127        $('.owl-carousel').css('height', heightGood  );
128        $('.owl-stage-outer').css('height', heightGood ); // CORRECT DRAG-AREA SO BUTTONS ARE CLICKABLE
129    }
130
131     if($("#instagram-widgets").length > 0) {
132		$.instagramFeed({
133			'username'			: $('#instagram-widgets').data('id'),
134			'container'			: "#instagram-widgets",
135			'display_profile'	: false,
136			'display_biography'	: false,
137			'display_gallery'	: true,
138			'get_raw_json'		: false,
139			'callback'			: null,
140			'styling'			: true,
141			'items'				: 8,
142			'items_per_row'		: 4,
143			'margin'			: 1
144		});
145	}
146    $('#cookies').on('click', function() {
147        $('.modal-cookie').css('display', 'none');
148        setCookie("cookiesvalide", '1', 300);
149    });
150    $(window).on('load', function() {
151        checkCookie();
152    })
153
154$('#zoom').click(function(e){
155    e.preventDefault()
156    $('body').toggleClass('big-eye')
157})
158
159
160});
161
162function setCookie(cname, cvalue, exdays) {
163	var d = new Date();
164	d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
165	var expires = "expires=" + d.toGMTString();
166	document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
167	//   document.cookie = cname + "=" + cvalue + ";" + "expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
168}
169
170function getCookie(cname) {
171	var name = cname + "=";
172	var decodedCookie = decodeURIComponent(document.cookie);
173	var ca = decodedCookie.split(';');
174	for (var i = 0; i < ca.length; i++) {
175		var c = ca[i];
176		while (c.charAt(0) == ' ') {
177			c = c.substring(1);
178		}
179		if (c.indexOf(name) == 0) {
180			return c.substring(name.length, c.length);
181		}
182	}
183	return "";
184}
185
186function checkCookie() {
187	var cookiesvalide = getCookie("cookiesvalide");
188	if (cookiesvalide != "") {
189		$('.modal-cookie').css('display', 'none');
190	} else {
191		$('.modal-cookie').css('display', 'flex');
192		$('.modal-cookie').css('left', '0');
193
194		setCookie("cookiesvalide", cookiesvalide, 300);
195		//  user = prompt("Please enter your name:","");
196
197	}
198}
199
200function clignotement(module) {
201	$($('#'+module+'_favoris i')).queue(function () {
202        $(this).addClass("fas").addClass("clignotement").dequeue();
203
204
205	}).animate({
206		top: ""}, 1000
207	).queue(function () {
208		$(this).removeClass("fas").removeClass("clignotement").dequeue();
209	})
210}
211
212$(".cibling").html(function(){
213    var text= $(this).text().trim().split(" ");
214    var first = text.shift();
215    return (text.length > 0 ? "<span class='black'>"+ first + "</span> " : first) + text.join(" ");
216  });

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.