fix: custom scrollbar does not reload after page switch

This commit is contained in:
saicaca 2024-06-22 01:03:08 +08:00
parent 960e85f92d
commit 176b38a4cb
1 changed files with 1 additions and 0 deletions

View File

@ -327,6 +327,7 @@ const setup = () => {
window.swup.hooks.on('link:click', () => {
document.documentElement.style.setProperty('--content-delay', '0ms')
})
window.swup.hooks.on('content:replace', initCustomScrollbar)
}
if (window.swup.hooks) {
setup()