avatar
Hespethorn
HespethornのBlog
GitHub
Recent Posts
Website Info
Article Count :
412
Runtime :
Total Word Count :
685.2k
Last Update :
Once') document.querySelectorAll('script[data-pjax]').forEach(item => { const newScript = document.createElement('script') const content = item.text || item.textContent || item.innerHTML || "" Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value)) newScript.appendChild(document.createTextNode(content)) item.parentNode.replaceChild(newScript, item) }) triggerPjaxFn(window.globalFn.pjaxComplete) }) document.addEventListener('pjax:error', e => { if (e.request.status === 404) { const usePjax = true true ? (usePjax ? pjax.loadUrl('/404') : window.location.href = '/404') : window.location.href = e.request.responseURL } }) })()