PageSourceSearch

https://www.3bmeteo.com/ass/js/main-mega-menu-3455904bed.js

js 3bmeteo.com collected 2026-09-24 08:35:46 UTC 3,794 bytes, 1 lines download raw bytes

1function initializeDesktopFeatures(){var e=document.body;if(window.innerWidth<840)console.log("Mega menu script not initialized on mobile.");else{var t=document.querySelectorAll(".mm-nav"),n=document.querySelectorAll(".mega-menu-wrapper"),a=null,r=null;t.forEach(function(e){e.addEventListener("click",function(e){var t=this.dataset.megamenuId;if(t)e.preventDefault(),async function(e,t){var n=document.getElementById(t);if(n){var s=e.classList.contains("megamenu-active");if(i(),!s){if(!n.dataset.loaded)try{var o=await fetch("/menu-parts/".concat(t));if(!o.ok)throw new Error("HTTP error ".concat(o.status," loading ").concat(t));var c=await o.text();n.innerHTML=c,n.dataset.loaded="true"}catch(e){return console.error("Error loading mega menu:",e),n.innerHTML='<p style="color: red; padding: 20px;">Error loading menu content.</p>',n.hidden=!1,n.classList.add("is-active"),void setTimeout(function(){i()},3e3)}n.hidden=!1,n.classList.add("is-active"),e.classList.add("megamenu-active"),e.setAttribute("aria-expanded","true");var l=e.querySelector(".nav-link__chevron");l&&(l.src="/z-components/icon/system/menu/chevron-up-m.svg"),a=t,r=e;var d=n.querySelector('a[aria-current="page"], button[aria-current="page"], input[aria-current="page"], [tabindex="0"][aria-current="page"]')||n.querySelector('a, button, input, [tabindex="0"]');null==d||d.focus()}}else console.error("Mega menu wrapper with ID ".concat(t," not found."))}(this,t);else if(a){var n=document.getElementById(a);if(n&&(n.classList.remove("is-active"),n.hidden=!0),r){r.classList.remove("megamenu-active"),r.hasAttribute("aria-expanded")&&r.setAttribute("aria-expanded","false");var s=r.querySelector(".nav-link__chevron");s&&(s.src="/z-components/icon/system/menu/chevron-down-m.svg")}a=null,r=null}})}),document.addEventListener("click",function(e){if(a){var t=e.target.closest(".site-header"),n=e.target.closest(".mega-menu-wrapper.is-active");t||n||i()}}),document.addEventListener("keydown",function(e){if("Escape"===e.key&&a){var t=r;i(),null==t||t.focus()}}),function(){var t=document.querySelector(".site-header"),n=document.querySelector("#header-entry-sentinel"),a=document.querySelector("#header-exit-sentinel");if(t&&n&&a){var r=!0,i=0,s=new IntersectionObserver(function(e){e.forEach(function(e){"header-exit-sentinel"!==e.target.id||e.isIntersecting||(r=!1,i=window.scrollY),"header-entry-sentinel"===e.target.id&&e.isIntersecting&&(r=!0,t.classList.remove("scrolled"))})});s.observe(n),s.observe(a);var o=window.scrollY,c=0,l=0;window.addEventListener("scroll",function(){var n=window.scrollY;if(window.innerWidth>=840&&document.dispatchEvent(new CustomEvent("request-close-search")),n<10)return t.classList.remove("scrolled","oov-scrolled"),e.classList.remove("scrolling-up","scrolling-down"),c=0,l=0,void(o=n);!r&&n>i+250&&t.classList.add("oov-scrolled"),!r&&n>i+350&&t.classList.add("scrolled"),Math.abs(n-o)<2||(n>o?(l++,c=0,l>10&&(e.classList.add("scrolling-down"),e.classList.remove("scrolling-up"))):(c++,l=0,c>10&&(e.classList.add("scrolling-up"),e.classList.remove("scrolling-down"))),o=n<=0?0:n)},{passive:!0})}else console.error("Header or sentinel elements are missing.")}()}function i(){n.forEach(function(e){e.classList.contains("is-active")&&(e.classList.remove("is-active"),e.hidden=!0)}),t.forEach(function(e){e.classList.contains("megamenu-active")&&e.classList.remove("megamenu-active"),e.classList.contains("mm-nav-active")&&e.classList.remove("mm-nav-active"),e.hasAttribute("aria-expanded")&&e.setAttribute("aria-expanded","false");var t=e.querySelector(".nav-link__chevron");t&&(t.src="/z-components/icon/system/menu/chevron-down-m.svg")}),a=null,r=null}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initializeDesktopFeatures):initializeDesktopFeatures();

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.