PageSourceSearch

https://www.liberticollingswood.org/mcms_live_stream/mcms_prayer_1.js

js liberticollingswood.org collected 2026-10-06 19:03:12 UTC 4,010 bytes, 150 lines download raw bytes

1jQuery(function($){
2	//prayer share lightbox (99% of our sites should have colorbox for lightboxes, but if not please add it for the form link or use your sites lightbox options)
3	$('#p1-share').colorbox({ iframe: true, opacity: 0.85, width: 860,height: 650,maxWidth: "75%",maxHeight: "75%" });
4
5	//prayer layout acknowledge link
6	$('body').on('click', '.p1-acknowledgment-link', function(event) {
7		event.preventDefault();
8		var link = $(this);
9		if (!link.hasClass('disabled')) {
10			p1SetAck(link);
11			var cookie = Cookies.get('acknowlegement_' + link.data('prayer'));
12			if (cookie) {
13				return;
14			}
15			axios.get(link.attr('href'))
16			.then(function (response) {
17				$('#acknowledgment_count_' + link.data('prayer')).text(response.data.acknowledgement_count);
18				if(response.data.acknowledgement_count == '1')
19				{
20					$('#acknowledgment_text_' + link.data('prayer')).text('time');
21				}
22				else
23				{
24					$('#acknowledgment_text_' + link.data('prayer')).text('times');
25				}
26				Cookies.set('acknowlegement_' +  link.data('prayer'), true, { expires: 9999, path: '/' });
27			})
28			.catch(function (error) {
29			   console.log(error);
30			});
31		}else{
32			alert('You have already prayed for this request.');
33		}
34	});
35
36
37	//on page load
38	if($('#p1-layout-results').length){
39		p1FilterLayout('');
40	}
41
42	//prayer layout pagination
43	$('body').on('click', '#pagination a', function(event) {
44		event.preventDefault();
45		if($(this).attr('href') == undefined){
46			return false;
47		}else {
48			var thisurl = $(this).attr('href');
49			var page = p1GetUrlParameter('page', thisurl);
50			if(page != undefined){
51				var data = 'page=' + page;
52				p1FilterLayout(data);
53				$('html, body').stop().animate({ scrollTop: $('#p1-layout-results').offset().top},350);
54			}else{
55				return false;
56			}
57		}
58	});
59
60
61	//media icons
62	$('.p1-monklet-sermon .media li a').prepend('<i class="icon"></i>');
63	$('.p1-monklet-sermon .media .watch a i').addClass('icon-film4');
64	$('.p1-monklet-sermon .media .listen a i').addClass('icon-mic');
65	$('.p1-monklet-sermon .media .download a i').addClass('icon-download4');
66	$('.p1-monklet-sermon .media .notes a i').addClass('icon-book3');
67
68	//sliders
69	$('.p1-slick').each(function(){
70		var $p1Slider = $(this);
71		if($p1Slider.data('show')){
72			var p1Show = parseInt($p1Slider.data('show'));
73		}
74		else{
75			var p1Show = 3;
76		}
77		$p1Slider.slick({
78			vertical: false,
79			initialSlide: 0,
80			slidesToShow: p1Show,
81			slidesToScroll: 1,
82			infinite: false,
83			speed: 500,
84			arrows: true,
85			dots: true,
86			adaptiveHeight: true,
87			responsive: [
88			{
89			//match css break
90			breakpoint: 992,
91				settings: {
92					vertical: true,
93					initialSlide: 0,
94					slidesToShow: p1Show,
95					slidesToScroll: 1,
96					infinite: false,
97					verticalSwiping: false
98				}
99			}]
100		});
101	});
102
103});
104
105
106//filter ajax
107function p1FilterLayout(data) {
108	$('#p1-layout-results').addClass('preloader');
109	$.ajax({
110		url : '/mcms_live_stream/ajax-prayer1-layout.php',
111		type: 'GET',
112		data: data,
113		success:function(results) {
114			$('#p1-layout-results').html(results).removeClass('preloader');
115			$('.p1-acknowledgment-link').each(function (index, link) {
116				var link = $(link);
117				var cookie = Cookies.get('acknowlegement_' + link.data('prayer'));
118				if (cookie) {
119					p1SetAck(link);
120				}
121			});
122		},
123		error: function(results, textStatus, jqXHR) {
124			//add error messages as needed console.log(jqXHR.responseText);
125		}
126	});
127
128}
129
130//set disable acknowledge link
131function p1SetAck($button) {
132	$button.addClass('disabled');
133	$button.find('.icon').toggleClass('icon-checkmark icon-thumbs-up');
134	$button.find('.text').html('Thanks for praying');
135}
136
137//get parameter from url
138function p1GetUrlParameter(param, url){
139	//var sPageURL = url;//window.location.search.substring(1);
140	var sPageURL = url.split('?')[1];
141	var sURLVariables = sPageURL.split('&');
142	for (var i = 0; i < sURLVariables.length; i++)
143	{
144		var sParameterName = sURLVariables[i].split('=');
145		if (sParameterName[0] == param)
146		{
147			return sParameterName[1];
148		}
149	}
150}

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.