26 lines
701 B
Plaintext
26 lines
701 B
Plaintext
<%- __js('js/libs/pjax.min.js') %>
|
|
<script>
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
const pjax = new Pjax({
|
|
selectors: [
|
|
'head title',
|
|
'.page-container',
|
|
'.pjax',
|
|
],
|
|
history: true,
|
|
cacheBust: false,
|
|
currentUrlFullReload: false,
|
|
timeout: 0,
|
|
scrollTo: false,
|
|
scrollRestoration: false,
|
|
debug: false,
|
|
});
|
|
|
|
window.addEventListener('pjax:complete', () => {
|
|
|
|
KEEP.refresh();
|
|
pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
|
|
});
|
|
});
|
|
</script>
|