PageSourceSearch

https://www.bretmichaels.com/wp-content/themes/colormag-pro/assets/js/navigation.min.js?ver=5.2.5

js bretmichaels.com collected 2026-09-24 22:42:46 UTC 3,465 bytes, 1 lines download raw bytes

1!function(){var e,t,n,i,a,o;if((e=document.getElementById("cm-primary-nav"))&&void 0!==(t=e.getElementsByClassName("cm-menu-toggle")[0]))if(void 0!==(n=e.getElementsByTagName("ul")[0])){for(n.setAttribute("aria-expanded","false"),-1===n.className.indexOf("nav-menu")&&(n.className+="nav-menu"),t.onclick=function(){-1!==e.className.indexOf("cm-mobile-nav")?(e.className=e.className.replace("cm-mobile-nav","cm-primary-nav"),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false")):(e.className=e.className.replace("cm-primary-nav","cm-mobile-nav"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"))},a=0,o=(i=n.getElementsByTagName("a")).length;a<o;a++)i[a].addEventListener("focus",s,!0),i[a].addEventListener("blur",s,!0);!function(e){var t,n,i=e.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");if("ontouchstart"in window&&window.matchMedia("(min-width: 768px)").matches)for(t=function(e){var t,n=this.parentNode;if(n.classList.contains("focus"))n.classList.remove("focus");else{for(e.preventDefault(),t=0;t<n.parentNode.children.length;++t)n!==n.parentNode.children[t]&&n.parentNode.children[t].classList.remove("focus");n.classList.add("focus")}},n=0;n<i.length;++n)i[n].addEventListener("touchstart",t,!1)}(e)}else t.style.display="none";function s(){for(var e=this;-1===e.className.indexOf("nav-menu");)"li"===e.tagName.toLowerCase()&&(-1!==e.className.indexOf("focus")?e.className=e.className.replace(" focus",""):e.className+=" focus"),e=e.parentElement}}();const CM_MOBILE_BREAKPOINT="(max-width: 768px)";let cmViewportHandler=null;function initMobileNavigation(){const e=document.querySelector(".cm-mobile-nav-container");if(!e)return;const t=e.querySelector(".cm-menu-toggle"),n=e.querySelector(".cm-mobile-menu"),i=e.querySelector(".cm-mobile-header-row");if(!t||!n||!i)return;function a(){if(!n.classList.contains("cm-mobile-menu--open"))return;if(!window.matchMedia("(max-width: 768px)").matches)return void o();const e=window.innerHeight-n.getBoundingClientRect().top;n.style.maxHeight=e+"px",n.classList.add("menu-scrollbar")}function o(){n.style.maxHeight="",n.classList.remove("menu-scrollbar")}cmViewportHandler&&(window.removeEventListener("resize",cmViewportHandler),window.removeEventListener("orientationchange",cmViewportHandler));let s=null;cmViewportHandler=function(){s&&window.cancelAnimationFrame(s),s=window.requestAnimationFrame(a)},window.addEventListener("resize",cmViewportHandler),window.addEventListener("orientationchange",cmViewportHandler);const r=t.cloneNode(!0);t.parentNode.replaceChild(r,t),r.setAttribute("aria-expanded","false"),r.addEventListener("click",(function(t){t.preventDefault();const s=t.currentTarget,r="true"===s.getAttribute("aria-expanded");s.setAttribute("aria-expanded",!r),r?(e.classList.remove("cm-toggle-open"),n.classList.remove("cm-mobile-menu--open"),i.classList.remove("cm-mobile-menu--open"),o()):(e.classList.add("cm-toggle-open"),n.classList.add("cm-mobile-menu--open"),i.classList.add("cm-mobile-menu--open"),a())}))}document.addEventListener("DOMContentLoaded",(function(){initMobileNavigation()})),"undefined"!=typeof wp&&wp.customize&&wp.customize.bind("preview-ready",(function(){initMobileNavigation(),wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(){setTimeout(initMobileNavigation,150)})),wp.customize.preview.bind("refresh",(function(){setTimeout(initMobileNavigation,150)}))}));

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.