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