32 lines
900 B
Plaintext
32 lines
900 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,
|
|
});
|
|
|
|
|
|
document.addEventListener('pjax:send', () => {
|
|
KEEP.utils.loadingProgressBarStart();
|
|
});
|
|
|
|
document.addEventListener('pjax:complete', () => {
|
|
KEEP.utils.loadingProgressBarEnd();
|
|
pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
|
|
KEEP.refresh();
|
|
});
|
|
});
|
|
</script>
|