fix: fix errors and reformat code

This commit is contained in:
saicaca
2024-08-03 16:40:20 +08:00
parent 1f93499ece
commit 0ad144add3
44 changed files with 550 additions and 558 deletions

View File

@@ -297,7 +297,7 @@ const setup = () => {
document.documentElement.style.setProperty('--content-delay', '0ms')
})
window.swup.hooks.on('content:replace', initCustomScrollbar)
window.swup.hooks.on('visit:start', (visit) => {
window.swup.hooks.on('visit:start', (visit: {to: {url: string}}) => {
// change banner height immediately when a link is clicked
const bodyElement = document.querySelector('body')
if (pathsEqual(visit.to.url, url('/'))) {
@@ -364,7 +364,6 @@ const setup = () => {
window.swup.hooks.on(
"content:replace",
() => {
console.log("content:replace")
lightbox?.destroy?.()
},
{ before: true },