PageSourceSearch

https://www.kfh.com/.resources/kfh-templates/webresources/kfh-theme/js/rebranding-2025/header.js

js kfh.com collected 2026-09-24 09:04:24 UTC 3,980 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".site-header");if(e){var t,n=e.clientHeight,o=e.offsetTop+80,c=document.body,i=function(){var t=window.scrollY;n=e.clientHeight,c.style.setProperty("padding-top","".concat(n,"px"),"important"),t>o?e.classList.add("header-sticky"):e.classList.remove("header-sticky")};i(),window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout(i,100)})),window.addEventListener("scroll",i)}})),document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".hamburger"),t=document.querySelector(".menu-main--content"),n=document.body,o=document.getElementById("search-container"),c=document.querySelectorAll(".dropdown-container"),i=document.querySelectorAll(".dropdown-close"),s=function(){c.forEach((function(e){e.classList.remove("dropdown-active")})),n.classList.remove("active-dropdown")},a=function(){o.classList.remove("active")};function r(){var e=document.querySelector(".nav-dropdown.submenu-active");t.classList.toggle("submenu-open",!!e)}function d(){document.querySelectorAll(".nav-dropdown.submenu-active").forEach((function(e){return e.classList.remove("submenu-active")})),document.querySelectorAll(".primary-nav-item.active").forEach((function(e){return e.classList.remove("active")})),document.querySelectorAll(".menu-icon.active").forEach((function(e){return e.classList.remove("active")})),t.classList.remove("submenu-open")}e.addEventListener("click",(function(){var o=e.classList.toggle("is-active");t.classList.toggle("menu-active"),n.classList.toggle("menu-active"),o?(a(),s(),function(){var e=document.querySelector(".horizontal-list"),t=document.querySelector(".horizontal-list .link-active"),n=document.body.classList.contains("rtl-ar");if(e&&t){var o=e.getBoundingClientRect(),c=t.getBoundingClientRect(),i=n?c.right-o.right:c.left-o.left;e.scrollBy({left:i,behavior:"smooth"})}}()):d()})),document.querySelectorAll(".menu-arrow, .menu-icon").forEach((function(e){e.addEventListener("click",(function(e){var t,n,o;e.stopPropagation(),n=(t=e.currentTarget.closest(".primary-nav-item--dropdown")).querySelector(".nav-dropdown"),o=t.querySelector(".menu-icon"),n.classList.contains("submenu-active")?(n.classList.remove("submenu-active"),t.classList.remove("active"),o.classList.remove("active")):(d(),n.classList.add("submenu-active"),t.classList.add("active"),o.classList.add("active")),r()}))})),document.querySelectorAll(".go__back").forEach((function(e){e.addEventListener("click",(function(){var t=e.closest(".nav-dropdown");if(t){t.classList.remove("submenu-active");var n=t.closest(".primary-nav-item");if(n){n.classList.remove("active");var o=n.querySelector(".menu-icon");o&&o.classList.remove("active")}}r()}))})),document.querySelectorAll(".dropdown-header").forEach((function(o){o.addEventListener("click",(function(c){c.stopPropagation();var i=o.closest(".dropdown-container"),r=i.classList.contains("dropdown-active");a(),e.classList.remove("is-active"),t.classList.remove("menu-active"),n.classList.remove("menu-active"),d(),s(),r||(i.classList.add("dropdown-active"),n.classList.add("active-dropdown"))}))})),document.addEventListener("click",(function(){return s()}));var l=document.getElementById("search-button"),u=document.getElementById("close-button");l.addEventListener("click",(function(c){c.stopPropagation(),o.classList.toggle("active"),o.classList.contains("active")&&(s(),e.classList.remove("is-active"),t.classList.remove("menu-active"),n.classList.remove("menu-active"),d())})),u.addEventListener("click",(function(e){e.stopPropagation(),a()})),document.addEventListener("click",(function(e){o.contains(e.target)||e.target===l||a()})),i.forEach((function(e){e.addEventListener("click",(function(t){var o;t.stopPropagation(),e.classList.toggle("active-icon"),(o=document.querySelector(".dropdown-container.dropdown-active"))&&(o.classList.remove("dropdown-active"),n.classList.remove("active-dropdown"))}))}))}));

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.