PageSourceSearch

https://www.rmsawwa.org/templates/Kensington/scripts/custom.js

js rmsawwa.org collected 2026-10-04 08:56:16 UTC 2,622 bytes, 79 lines download raw bytes

1/*****  PAGE TITLES  *****/
2const currentPage = window.location.pathname;
3let pageTitle0 = currentPage.replace('/', '');
4let pageTitle = pageTitle0.replace(/-/g, ' ');
5if (pageTitle.indexOf("profile#") !== -1) {pageTitle = "My Profile";}
6if (pageTitle.indexOf("directory#") !== -1) {pageTitle = "Membership Directory";}
7
8if(pageTitle == "index.php"){
9	const indexPages = window.location.search;
10	
11	if (indexPages.indexOf("events") !== -1) {
12		pageTitle="Event Calendar";	
13	}
14	else if (indexPages.indexOf("com_ccboard") !== -1) {
15		pageTitle="Community Forum";	
16	}
17	else if (indexPages.indexOf("com_community") !== -1) {
18		pageTitle="My Community";	
19	}
20	else if (indexPages.indexOf("com_search") !== -1) {
21		pageTitle="Search";	
22	}
23	else {pageTitle="";}
24}
25document.getElementById("subhead-page-title").innerHTML = pageTitle;
26
27/**** SCROLL TO TOP ****/
28function topFunction() {
29  event.preventDefault()
30  window.scrollTo({top: 0, behavior: 'smooth'});
31
32};
33
34/**** SHOW/HIDE SEARCH MODAL ****/
35
36function showModal() {
37	$('#site-modal').toggleClass('hide-modal');
38	$('body').toggleClass('no-scroll');
39};
40
41
42// Select the element to observe
43const myElement = document.getElementById('two-block-l');
44// Create an Intersection Observer instance
45const observer = new IntersectionObserver((entries) => {
46  entries.forEach(entry => {
47    // If the element is intersecting (in view)
48    if (entry.isIntersecting) {
49      entry.target.classList.add('animate__animated', 'animate__fadeInLeft', 'animate__slow', 'show-for-move'); // Add the class
50    } 
51  });
52}, {
53  threshold: 0.5 // percentage of target element visible to trigger callback
54});
55// Start observing the target element
56observer.observe(myElement);
57
58// Select the element to observe
59const myElement2 = document.getElementById('two-block-r');
60// Create an Intersection Observer instance
61const observer2 = new IntersectionObserver((entries) => {
62  entries.forEach(entry => {
63    // If the element is intersecting (in view)
64    if (entry.isIntersecting) {
65      entry.target.classList.add('animate__animated', 'animate__fadeInRight', 'animate__slow', 'show-for-move'); // Add the class
66    } 
67  });
68}, {
69  threshold: 0.5 // percentage of target element visible to trigger callback
70});
71// Start observing the target element
72observer2.observe(myElement2);
73
74
75const NoDLVid = document.getElementById('home-page-section-1');
76NoDLVid.addEventListener('contextmenu', function(event) {
77  event.preventDefault(); // Prevent the default right-click menu
78  console.log("Right-click attempted on NoDLVid!");
79});

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.