-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpjax.js
More file actions
1 lines (1 loc) · 990 Bytes
/
pjax.js
File metadata and controls
1 lines (1 loc) · 990 Bytes
1
const pjax=new Pjax({selectors:["head title",'meta[property="og:title"]','script[type="application/json"]',".post-toc-wrap",".main-inner",".languages",".pjax"],switches:{".post-toc-wrap":function(e,t){t.querySelector(".post-toc")?Pjax.switches.outerHTML.call(this,e,t):((t=e.querySelector(".post-toc"))&&t.classList.add("placeholder-toc"),this.onSwitch())}},analytics:!1,cacheBust:!1,scrollTo:!CONFIG.bookmark.enable});document.addEventListener("pjax:success",()=>{var e;pjax.executeScripts(document.querySelectorAll("script[data-pjax]")),NexT.boot.refresh(),CONFIG.motion.enable&&NexT.motion.integrator.init().add(NexT.motion.middleWares.subMenu).add(NexT.motion.middleWares.postList).add(NexT.motion.middleWares.sidebar).bootstrap(),"remove"!==CONFIG.sidebar.display&&(e=document.querySelector(".post-toc:not(.placeholder-toc)"),document.querySelector(".sidebar-inner").classList.toggle("sidebar-nav-active",e),NexT.utils.activateSidebarPanel(e?0:1),NexT.utils.updateSidebarPosition())});