PageSourceSearch

https://wildlandsconservancy.org/wp-content/themes/wildlands/public/components/megamenu-1.js?ver=7.1.1

js wildlandsconservancy.org collected 2026-10-02 05:29:16 UTC 2,172 bytes, 1 lines download raw bytes

1(()=>{"use strict";function e(e=""){const t=document.querySelector(".component-header-1");t&&(t.style.paddingRight=e)}function t(e=""){const t=document.querySelectorAll(".component-megamenu-1");t.length&&t.forEach((t=>{t.style.paddingRight=e}))}function n(){return document.body.classList.contains("scroll-lock")}window.anvil.component("megamenu-1",(o=>{if(hammer.isAdmin)return;const{megamenu:c}=o.dataset,s=document.querySelector(".js-header"),a=document.querySelectorAll(`.js-megamenu-toggler[data-megamenu="${c}"]`),i=o.querySelectorAll(".js-megamenu-close"),m=()=>o.classList.contains("is-active"),d=()=>window.innerWidth>=1200,r=()=>{clearTimeout(o.timeout),m()||(document.querySelectorAll(".component-megamenu-1.is-active").forEach((e=>{if(e===o)return;clearTimeout(e.timeout),e.classList.remove("is-active");const t=e.dataset.megamenu;document.querySelectorAll(`.js-megamenu-toggler[data-megamenu="${t}"]`).forEach((e=>e.setAttribute("aria-expanded","false")))})),o.classList.add("is-active"),g(!0),v(!0),function(){if(n())return;const o=function(){const e=window.innerWidth-document.documentElement.clientWidth;return e>0?e:0}();o>0&&(e(`${o}px`),t(`${o}px`),document.body.style.paddingRight=`${o}px`),document.body.classList.add("scroll-lock")}())},u=(c=!1)=>{clearTimeout(o.timeout);const s=()=>{m()&&(o.classList.remove("is-active"),g(!1),v(!1),n()&&(e(""),t(""),document.body.style.paddingRight="",document.body.classList.remove("scroll-lock")))};c?s():o.timeout=setTimeout(s,200)},l=()=>{m()?u():r()},g=e=>{a.length&&a.forEach((t=>t.setAttribute("aria-expanded",e)))},v=e=>{s&&(e?s.classList.add("is-megamenu-active"):document.querySelector(".component-megamenu-1.is-active")||s.classList.remove("is-megamenu-active"))};i.forEach((e=>e.addEventListener("click",(()=>u(!0))))),a.forEach((e=>{if("desktop"===e.dataset.viewport){let t;e.matches(":hover")&&r();const n=()=>{d()&&(t=setTimeout(r,100))},c=()=>{d()&&(clearTimeout(t),u())};e.addEventListener("mouseenter",n),o.addEventListener("mouseenter",n),e.addEventListener("mouseleave",c),o.addEventListener("mouseleave",c)}else e.addEventListener("click",l)})),s?.addEventListener("megamenu:close",u)}))})();

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.