관리-도구
편집 파일: navigation.min.js
!function(){let e=document.getElementById("site-navigation");if(!e)return;let t=e.getElementsByTagName("button")[0];if(void 0===t)return;let a=e.getElementsByTagName("ul")[0];if(void 0===a){t.style.display="none";return}a.classList.contains("nav-menu")||a.classList.add("nav-menu"),t.addEventListener("click",function(){e.classList.toggle("toggled"),"true"===t.getAttribute("aria-expanded")?t.setAttribute("aria-expanded","false"):t.setAttribute("aria-expanded","true")}),document.addEventListener("click",function(a){let s=e.contains(a.target);s||(e.classList.remove("toggled"),t.setAttribute("aria-expanded","false"))});let s=a.getElementsByTagName("a"),n=a.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");for(let i of s)i.addEventListener("focus",r,!0),i.addEventListener("blur",r,!0);for(let l of n)l.addEventListener("touchstart",r,!1);function r(){if("focus"===event.type||"blur"===event.type){let e=this;for(;!e.classList.contains("nav-menu");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentNode}if("touchstart"===event.type){let t=this.parentNode;for(let a of(event.preventDefault(),t.parentNode.children))t!==a&&a.classList.remove("focus");t.classList.toggle("focus")}}}();