mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: toggle top progress bar
This commit is contained in:
parent
5c617aa374
commit
44454152ea
1 changed files with 3 additions and 0 deletions
|
|
@ -129,6 +129,9 @@ const pjax = new PJAX({
|
|||
forceCache: true, // TODO: merge namespace, add forceCache
|
||||
})
|
||||
|
||||
window.addEventListener('pjax:send', () => mountTopProgressBar())
|
||||
window.addEventListener('pjax:complete', () => unmountTopProgressBar())
|
||||
|
||||
export function loadWithPJAX(URL: string) {
|
||||
mountTopProgressBar()
|
||||
pjax.loadUrl(URL, { scrollTo: 0 })
|
||||
|
|
|
|||
Loading…
Reference in a new issue