Skip to content

Commit

Permalink
feat: ✨ add unload to loading indicator
Browse files Browse the repository at this point in the history
Signed-off-by: WaitSpring <[email protected]>
  • Loading branch information
WaitSpringQW committed Nov 25, 2023
1 parent 63b7c83 commit aca7d75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/skins.citizen.scripts/skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ function main( window ) {
// Set up loading indicator
document.documentElement.classList.add( 'citizen-loading' );
}, false );

window.addEventListener( 'unload', function () {
// unset loading indicator
document.documentElement.classList.remove( 'citizen-loading' );
}, false );
}

if ( document.readyState === 'interactive' || document.readyState === 'complete' ) {
Expand Down

0 comments on commit aca7d75

Please sign in to comment.