PageSourceSearch

https://adriasolapastor.com/wp-content/plugins/nextbricks/elements/js/bc_overlay_menu.min.js?ver=1.10.1

js adriasolapastor.com collected 2026-10-04 13:26:39 UTC 3,541 bytes, 11 lines download raw bytes

1function manipularTabIndex(e){let t=e.hasAttribute("tabindex")&&"-1"===e.getAttribute("tabindex");t?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");let r=e.children;for(let a=0;a<r.length;a++)manipularTabIndex(r[a]);}
2function applyTabIndexRecursively(element){if(element.nodeType===Node.ELEMENT_NODE){if(!element.hasAttribute("tabindex")||element.getAttribute("tabindex")!=="-1"){element.setAttribute("tabindex","-1")}
3Array.from(element.children).forEach(applyTabIndexRecursively)}}
4function overlaymenu(){let bricksPreview=window.location.href.includes("brickspreview");document.querySelectorAll(".bc-overlay-menu").forEach((e)=>{let toggleBody=e.getAttribute("data-customtoggle-lock-body-scrolling")==="1";let closeOnEsc=e.getAttribute("data-close-on-esc")==="1";let t=!1,r=e.querySelector(".bc-overlay-menu__content"),a=e.querySelector(".bc-overlay-menu__items-wrapper"),i=gsap.timeline({onReverseComplete:function(){(a.style.visibility="hidden"),(a.style.pointerEvents="none")},paused:!0,});var n=e.getAttribute("data-duration"),o=e.getAttribute("data-top"),l=e.getAttribute("data-scale"),s=e.getAttribute("data-easing");i.to(r,parseFloat(n),{top:String(o),scale:parseFloat(l),ease:String(s)}).reverse();let u=document.querySelectorAll(".bc-core-burguer"),c=e.querySelectorAll(".bc-core-burguer"),d=!1,b=e.getAttribute("data-customtoggle");var y=b.replace(".","");if(!bricksPreview){const observer=new MutationObserver((mutations)=>{mutations.forEach((mutation)=>{if(mutation.type==="childList"){mutation.addedNodes.forEach((node)=>{if(node.nodeType===Node.ELEMENT_NODE){applyTabIndexRecursively(node)}})}})});observer.observe(a,{childList:!0,subtree:!0})}
5function g(){manipularTabIndex(a),(d=!d),c.forEach((e)=>{let t=e.querySelector("button"),r=t.classList,a="";r.length>0&&(a=`${r[0]}--opened`),d?(t.classList.add(a),t.setAttribute("aria-expanded","true")):(t.classList.remove(a),t.setAttribute("aria-expanded","false"))}),u.forEach((t)=>{if(!e.contains(t)&&t.classList.contains(y)){let r=t.querySelector("button"),a=r.classList,i="";a.length>0&&(i=`${a[0]}--opened`),d?(r.classList.add(i),r.setAttribute("aria-expanded","true")):(r.classList.remove(i),r.setAttribute("aria-expanded","false"))}}),d?(i.reversed(!1),(a.style.visibility="visible"),(a.style.pointerEvents="all")):i.reversed(!0)}
6manipularTabIndex(a);function toggleBodyScroll(){if(toggleBody){if(document.querySelector("html").hasAttribute("bc-core-burguer--body-toggled")){if(window.lenisInstance){window.lenisInstance.start()}}else{if(window.lenisInstance){window.lenisInstance.stop()}}
7document.querySelector("html").toggleAttribute("bc-core-burguer--body-toggled")}}
8if(b){var gs=document.querySelectorAll(b);gs.forEach((element)=>{if(!element.hasAttribute("tabindex")){element.setAttribute("tabindex","0")}
9element.addEventListener("click",function(){toggleBodyScroll();g()});element.addEventListener("keydown",function(event){if(event.key==="Enter"){toggleBodyScroll();g();event.stopImmediatePropagation()}})})}
10c.forEach((e)=>{1==parseFloat(e.querySelector("button").getAttribute("data-scroll"))&&(t=!0),e.addEventListener("click",function(){g()})}),window.location.href.includes("brickspreview")||document.addEventListener("keydown",function(e){if(d&&closeOnEsc&&"Escape"===e.key){g();if(t&&document.querySelector("html").hasAttribute("bc-core-burguer--body-toggled")){document.querySelector("html").removeAttribute("bc-core-burguer--body-toggled")}}})})}
11document.addEventListener("DOMContentLoaded",function(){bricksIsFrontend&&overlaymenu()})

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.