PageSourceSearch

https://verdora.ca/wp-content/themes/verdora_theme/js/footerswitch.js?ver=1.0.0

js verdora.ca collected 2026-10-04 18:37:01 UTC 1,199 bytes, 40 lines download raw bytes

1( function() {
2	const frenchFooterSelector = '.footerFrancais';
3	const englishFooterSelector = '.footerAnglais';
4
5	function getCurrentLanguage() {
6		return ( document.documentElement.getAttribute( 'lang' ) || '' ).toLowerCase();
7	}
8
9	function setFooterVisibility( footer, isVisible ) {
10		footer.hidden = ! isVisible;
11		footer.style.display = isVisible ? '' : 'none';
12
13		if ( isVisible ) {
14			footer.removeAttribute( 'aria-hidden' );
15			return;
16		}
17
18		footer.setAttribute( 'aria-hidden', 'true' );
19	}
20
21	function switchFooters() {
22		const isEnglish = getCurrentLanguage().startsWith( 'en' );
23		const frenchFooters = document.querySelectorAll( frenchFooterSelector );
24		const englishFooters = document.querySelectorAll( englishFooterSelector );
25
26		frenchFooters.forEach( ( footer ) => setFooterVisibility( footer, ! isEnglish ) );
27		englishFooters.forEach( ( footer ) => setFooterVisibility( footer, isEnglish ) );
28	}
29
30	if ( document.readyState === 'loading' ) {
31		document.addEventListener( 'DOMContentLoaded', switchFooters );
32	} else {
33		switchFooters();
34	}
35
36	new MutationObserver( switchFooters ).observe( document.documentElement, {
37		attributes: true,
38		attributeFilter: [ 'lang' ],
39	} );
40}() );

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.