1/* global NexT, CONFIG, Pjax */ 2 3const pjax = new Pjax({ 4 selectors: [ 5 'head title', 6 'meta[property="og:title"]', 7 'script[type="application/json"]', 8 // Precede .main-inner to prevent placeholder TOC changes asap 9 '.post-toc-wrap', 10 '.main-inner', 11 '.languages', 12 '.pjax' 13 ], 14 switches: { 15 '.post-toc-wrap'(oldWrap, newWrap) { 16 if (newWrap.querySelector('.post-toc')) { 17 Pjax.switches.outerHTML.call(this, oldWrap, newWrap); 18 } else { 19 const curTOC = oldWrap.querySelector('.post-toc'); 20 if (curTOC) { 21 curTOC.classList.add('placeholder-toc'); 22 } 23 this.onSwitch(); 24 } 25 } 26 }, 27 analytics: false, 28 cacheBust: false, 29 scrollTo : !CONFIG.bookmark.enable 30}); 31 32document.addEventListener('pjax:success', () => { 33 pjax.executeScripts(document.querySelectorAll('script[data-pjax]')); 34 NexT.boot.refresh(); 35 // Define Motion Sequence & Bootstrap Motion. 36 if (CONFIG.motion.enable) { 37 NexT.motion.integrator 38 .init() 39 .add(NexT.motion.middleWares.subMenu) 40 // Add sidebar-post-related transition. 41 .add(NexT.motion.middleWares.sidebar) 42 .add(NexT.motion.middleWares.postList) 43 .bootstrap(); 44 } 45 if (CONFIG.sidebar.display !== 'remove') { 46 const hasTOC = document.querySelector('.post-toc:not(.placeholder-toc)'); 47 document.querySelector('.sidebar-inner').classList.toggle('sidebar-nav-active', hasTOC); 48 NexT.utils.activateSidebarPanel(hasTOC ? 0 : 1); 49 NexT.utils.updateSidebarPosition(); 50 } 51}); 52 53if (!window.pjax) window.pjax = pjax;
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.