PageSourceSearch

https://hapmaastricht.nl/da/wp-content/themes/hap-base/build/scripts/language-selector.js

js hapmaastricht.nl collected 2026-10-08 17:49:02 UTC 1,596 bytes, 1 lines download raw bytes

1!function(){class e{constructor(){this.selectors=document.querySelectorAll("[data-language-selector]"),this.init()}init(){this.selectors.forEach((e=>{const t=e.querySelector("[data-language-toggle]"),o=e.querySelector("[data-language-dropdown]");t&&o&&(t.addEventListener("click",(e=>{e.preventDefault(),this.toggleDropdown(t,o)})),t.addEventListener("keydown",(e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),this.toggleDropdown(t,o)):"ArrowDown"===e.key&&(e.preventDefault(),this.openDropdown(t,o),this.focusFirstItem(o))})),document.addEventListener("click",(n=>{e.contains(n.target)||this.closeDropdown(t,o)})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&(this.closeDropdown(t,o),t.focus())})),o.addEventListener("keydown",(e=>{this.handleDropdownNavigation(e,o)})))}))}toggleDropdown(e,t){"true"===e.getAttribute("aria-expanded")?this.closeDropdown(e,t):this.openDropdown(e,t)}openDropdown(e,t){e.setAttribute("aria-expanded","true"),t.style.display="block"}closeDropdown(e,t){e.setAttribute("aria-expanded","false"),t.style.display=""}focusFirstItem(e){const t=e.querySelector(".language-selector__link");t&&t.focus()}handleDropdownNavigation(e,t){const o=t.querySelectorAll(".language-selector__link"),n=Array.from(o).indexOf(document.activeElement);switch(e.key){case"ArrowDown":e.preventDefault(),o[n<o.length-1?n+1:0].focus();break;case"ArrowUp":e.preventDefault(),o[n>0?n-1:o.length-1].focus();break;case"Home":e.preventDefault(),o[0].focus();break;case"End":e.preventDefault(),o[o.length-1].focus()}}}document.addEventListener("DOMContentLoaded",(()=>{new e}))}();

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.