PageSourceSearch

https://carmelchristian.org/shared/js/scripts.js

js carmelchristian.org collected 2026-10-06 18:50:46 UTC 2,383 bytes, 67 lines download raw bytes

1$(function(){
2		$('.top-level:last-child,.quicklinks li:last-child').css({'background': 'none'});
3		// $(".menu-opener").click(function(){
4  		//     $(".menu-opener,.menu-opener-inner,.menu").toggleClass("active");
5	    // });	
6		$(".menu-opener").click(function(){
7  		    $(".menu-opener,.menu-opener-inner,#nav_items_0").toggleClass("active");
8	    });	
9		$('b').replaceWith(function(){
10			return $('<strong>').append($(this).html());
11		});
12		$('i').replaceWith(function(){
13			return $('<em>').append($(this).html());
14		}); 
15});
16
17function resizeCardSlider() {
18	if (window.innerWidth > 1150) {
19	  return;
20	} else if (window.innerWidth <= 1150) {
21	  let columnGap = [];
22	  let slider = document.querySelectorAll('.en-card-slider-inner-container');
23	  if (!slider) return;
24	  for (let i = 0; i < slider.length; i++) {
25		columnGap = slider[i].style.getPropertyValue('column-gap').replace('px', '');
26		slider[i].style.removeProperty('column-gap');
27		slider[i].style.setProperty('column-gap', Number(columnGap) + 1 + 'px', 'important');
28	  }
29	}
30  }
31  let _debounce = function (ms, fn) {
32	let timer;
33	return function () {
34	  clearTimeout(timer);
35	  let args = Array.prototype.slice.call(arguments);
36	  args.unshift(this);
37	  timer = setTimeout(fn.bind.apply(fn, args), ms);
38	};
39  };
40  document.addEventListener('DOMContentLoaded', () => {
41	const observer = new ResizeObserver(_debounce(500, () => resizeCardSlider()));
42	let slider = document.querySelector('body');
43	observer.observe(slider);
44	const newsCard = document.querySelectorAll('div.en-news-slider div.en-card-slider-inner-container > a');
45	const newsTitle = document.querySelectorAll('.en-news-slider-title');
46	const newsSummary = document.querySelectorAll('.en-news-slider-summary');
47  
48	if (newsCard.length) {
49	  document.querySelector('.en-news-show-all a').textContent = 'Show All News';
50	  newsCard.forEach((element, index) => {
51		const newsContainer = document.createElement('div');
52		newsContainer.classList.add('news-feed');
53		newsContainer.appendChild(newsTitle[index]);
54		newsContainer.appendChild(newsSummary[index]);
55		element.appendChild(newsContainer);
56	  });
57	}
58	if(document.location.search === "?uREC_ID=496514&type=d"){
59		document.querySelector('body').classList.add("stf-lgn-frm");
60	  }
61  });
62  
63  class ENResponsiveDiv {
64	constructor() {
65	  throw new Error('ENResponsiveDiv class has been disabled.');
66	}
67  }

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.