1window.addEventListener("load", () => { 2 /* 3 header - mobile 4 */ 5 let modal = document.getElementById("modal-1"); // navigation modal 6 let modalContent = document.getElementById("modal-1-content"); // the modal's content 7 8 // logo 9 let mobileLogoLink = document.createElement("a"); // create a link node 10 mobileLogoLink.href = "/"; // link to home 11 mobileLogoLink.rel = "home"; // rel 12 mobileLogoLink.style.setProperty("width", "100%"); // make it visible 13 14 let mobileLogo = document.createElement("img"); // create an image node 15 mobileLogo.src = 16 "https://wp-cmief-2025.s3.ca-central-1.amazonaws.com/wp-content/uploads/2025/02/18145337/logo_eng.png"; // logo 17 mobileLogo.classList.add("mobile-logo"); // add a custom class for css styling 18 mobileLogo.style.setProperty("display", "none"); // hide by default 19 20 mobileLogoLink.appendChild(mobileLogo); // append logo to link node 21 modalContent.appendChild(mobileLogoLink); // append link to modal 22 23 /* 24 sticky 25 */ 26 27 // primary 28 if (document.querySelector(".headerPrimary") ?? false) { 29 let headerPrimary = document.getElementsByClassName("headerPrimary"); 30 let headerPrimaryImage = document.querySelector( 31 ".wp-block-site-logo a img" 32 ); 33 34 window.addEventListener("scroll", () => { 35 if (headerPrimary ?? false) { 36 let headerPrimaryTop = headerPrimary[0].offsetTop; 37 38 if (window.scrollY > headerPrimaryTop) { 39 headerPrimary[0].classList.add("sticky"); 40 // headerImage.src = 'https://adnet-child-themes.s3.ca-central-1.amazonaws.com/media/2023/11/logo_black.svg'; 41 } else { 42 headerPrimary[0].classList.remove("sticky"); 43 // headerImage.src = 'https://adnet-child-themes.s3.ca-central-1.amazonaws.com/media/2023/11/logo.svg'; 44 } 45 } 46 }); 47 } 48 49 // secondary 50 if (document.querySelector(".headerSecondary") ?? false) { 51 let headerSecondary = document.getElementsByClassName("headerSecondary"); 52 let headerSecondaryImage = document.querySelector( 53 ".wp-block-site-logo a img" 54 ); 55 56 window.addEventListener("scroll", () => { 57 if (headerSecondary ?? false) { 58 let headerSecondaryTop = headerSecondary[0].offsetTop; 59 60 if (window.scrollY > headerSecondaryTop) { 61 headerSecondary[0].classList.add("sticky"); 62 // headerImage.src = 'https://adnet-child-themes.s3.ca-central-1.amazonaws.com/media/2023/11/logo_black.svg'; 63 } else { 64 headerSecondary[0].classList.remove("sticky"); 65 // headerImage.src = 'https://adnet-child-themes.s3.ca-central-1.amazonaws.com/media/2023/11/logo.svg'; 66 } 67 } 68 }); 69 } 70});
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.