PageSourceSearch

https://www.fairvuepartners.com/wp-content/themes/terrapin/js/custom.js?ver=1711457682

js fairvuepartners.com collected 2026-10-05 23:25:23 UTC 3,449 bytes, 112 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function (event) {
2	
3	// Lazyload Hero Video on Home Page
4	setTimeout(function() {
5    	if (document.querySelector('.home .hero video')) {
6            let video = document.querySelector('.hero video');
7            let videoSrc = video.querySelector('source').dataset.src;
8            video.querySelector('source').setAttribute('src', videoSrc);
9            video.load();
10            video.play();
11        }
12	}, 1000);
13	
14	// Englishise Cookie Content
15	setTimeout(function() {
16		if (document.querySelector('.cky-preference-center')) {
17			const cookieContents = document.querySelectorAll('.cky-preference-center .cky-accordion-header-des p');
18			Array.prototype.forEach.call(cookieContents, function (el) {
19				let text = el.textContent;
20				text = text.replaceAll('z', 's');
21				el.innerText = text;
22			});
23		}
24	}, 1000);
25	
26	// Refresh video poster on end
27	if (document.querySelector('.content-image video, .content-image-plain video, .content-image-split video')) {
28		const videos = document.querySelectorAll('.content-image video, .content-image-plain video, .content-image-split video');
29		
30		Array.prototype.forEach.call(videos, function (el) {
31			el.addEventListener('ended', function() {
32				el.autoplay = false;
33			  	el.load();     
34			});
35		});
36	}
37	var video = document.querySelector('video');
38	if(video !== null) {
39	    video.addEventListener('ended', function() {
40	    video.load();     
41	    });   
42	}
43	
44	// Author Scroll
45	const urlString = window.location.search;
46	const params = new URLSearchParams(urlString);
47	const author = params.get('author');
48	
49	if (author) {
50		lenis.scrollTo(`#${author}`, {
51			offset: -150
52		});
53	}
54	
55	if (document.querySelector('a[href="#whitepaper-form"]')) {
56		const wpModal = document.querySelector('.wp-modal');
57		const wpLinks = document.querySelectorAll('a[href="#whitepaper-form"]');
58		Array.prototype.forEach.call(wpLinks, function (el) {
59			el.addEventListener('click', function(e){
60				e.preventDefault();
61				if (!wpModal.matches('.open')) {
62					let dl = el.dataset.wp;
63					document.querySelector('#input_3_6').value = dl;
64					wpModal.classList.add('open');
65				} else {
66					wpModal.classList.remove('open');
67				}
68			})
69		});
70		wpModal.addEventListener('click', function(e) {
71			if (!e.target.matches('.wp-modal-inner') && !e.target.closest('.wp-modal-inner')) {
72				wpModal.classList.remove('open');
73			}
74		});
75	}
76
77	if (document.querySelector('.cases-grid .case-item')) {
78		function setCaseTitles() {
79			const caseTitles = document.querySelectorAll('.cases-grid .case-item:not(:first-child) .text:first-child');
80			let titleHeight = 0;
81
82			Array.prototype.forEach.call(caseTitles, function (el) {
83				let thisHeight = el.offsetHeight;
84				if (thisHeight >= titleHeight) {
85					titleHeight = thisHeight;
86				}
87			});
88
89			Array.prototype.forEach.call(caseTitles, function (el) {
90				el.style.height = `${titleHeight}px`;
91			});
92		}
93		setTimeout(function(){
94		    setCaseTitles();
95		}, 500);
96		
97		screen.orientation.addEventListener('change', function () {
98			setCaseTitles();
99		});
100	}
101	
102	jQuery(document).on('gform_confirmation_loaded', function(event, formId){
103		if(formId == 3) {
104			setTimeout(function(){
105				window.location.reload();
106			}, 2000);
107		}
108	});
109	
110});
111
112console.log('%c🦄 coded by Tyler Hounsome @ cbwebsitedesign.co.uk', 'font-family: sans-serif, font-size: 40px; color: #fff; background: #250d61; padding: 5px 10px; margin: 5px 0;');

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.