PageSourceSearch

https://www.uniandes.edu.co/investigacioncreacion/storybook/dist/j…/02-molecules/navbar/_navbar.js?tlfir7

js uniandes.edu.co collected 2026-09-24 08:32:49 UTC 2,795 bytes, 1 lines download raw bytes

1Drupal.behaviors.navbar={attach:function(t){var e="selectedMenu",n=function(){return Array.from(document.querySelectorAll(".navbar__nav .btn-link--first-level"))},r=function(t){if(!t)return"";try{return new URL(t,window.location.origin).href}catch(e){return t}},a=function(t){if(!t)return"";try{return new URL(t,window.location.origin).pathname.replace(/\/+$/,"")||"/"}catch(t){return""}},o=function(){n().forEach(function(t){return t.classList.remove("selected")})},i=function(t){var e=a(t);if(e){var r=n().find(function(t){return a(t.getAttribute("href")||t.href)===e});r&&(o(),r.classList.add("selected"))}};n().forEach(function(t){var e=(t.getAttribute("href")||"").trim();e.startsWith("#")&&"#"!==e&&t.setAttribute("href","/".concat(e))}),function(){var t=n(),r=localStorage.getItem(e);if(t.length){var i=a(window.location.href),c=a(r),d=null;c&&(d=t.find(function(t){return a(t.getAttribute("href")||t.href)===c})),d||(d=t.find(function(t){return a(t.getAttribute("href")||t.href)===i})),d&&(o(),d.classList.add("selected"))}}(),window.__navbarSelectedDelegationAttached||(window.__navbarSelectedDelegationAttached=!0,document.addEventListener("click",function(t){var n=t.target.closest(".navbar__nav .btn-link--first-level");if(n){var o=(n.getAttribute("href")||"").trim(),c=a(window.location.href),d=a(n.href),l=n.hash,s=l?decodeURIComponent(l.slice(1)):"",u=l?document.getElementById(s)||document.querySelector(l):null;if(o.startsWith("#")&&"#"!==o||l&&"#"!==l&&d===c&&"/"!==c&&!u){t.preventDefault();var f="/".concat(l||o);return localStorage.setItem(e,r(f)),void(window.location.href="".concat(window.location.origin).concat(f))}var v=n.getAttribute("href")||n.href;localStorage.setItem(e,r(v)),i(v),requestAnimationFrame(function(){return i(v)})}})),window.__navbarScrollHandlerAttached||(window.__navbarScrollHandlerAttached=!0,window.addEventListener("scroll",function(){var t=document.querySelector(".navbar");t&&(document.documentElement.scrollTop>0?(t.classList.remove("navbar--primary"),t.classList.add("navbar--secondary")):(t.classList.remove("navbar--secondary"),t.classList.add("navbar--primary")))}));var c=function(){document.querySelectorAll(".navbar__user-dropdown").forEach(function(t){var e=t.querySelector(".dropdown__content");e&&(e.classList.contains("display-dropdown")?(e.classList.remove("dropdown__content--align-right"),e.getBoundingClientRect().right>window.innerWidth-8&&e.classList.add("dropdown__content--align-right")):e.classList.remove("dropdown__content--align-right"))})};window.__navbarUserDropdownAlignAttached||(window.__navbarUserDropdownAlignAttached=!0,document.addEventListener("click",function(t){t.target.closest(".navbar__user-dropdown")&&requestAnimationFrame(c)}),window.addEventListener("resize",function(){requestAnimationFrame(c)}))}};

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.