From dcc6f35266de1f56d7e9536311f0ff56b57c0fdc Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 30 Nov 2024 00:33:20 +0200 Subject: More refactoring and fixing a bug on spa-router --- src/js/arching-kaos-spa-router.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/js/arching-kaos-spa-router.js') diff --git a/src/js/arching-kaos-spa-router.js b/src/js/arching-kaos-spa-router.js index 162a316..d1cf2a4 100644 --- a/src/js/arching-kaos-spa-router.js +++ b/src/js/arching-kaos-spa-router.js @@ -48,19 +48,27 @@ export function locationHashOnChange() route.menuid = '#'+route.args[1]; route.subcommand = route.args[2]; menuinit(); - if ( (locationHashGetter() !== 'undefined') && (locationHashGetter() === '') ){ - getWelcomeSection.hidden=false; + if ( (locationHashGetter() !== 'undefined') && (locationHashGetter() === '') ) + { + getWelcomeSection().hidden=false; } - else if ( route.args[1] == "route" ) { - getWelcomeSection.hidden=false; - if ( route.args.length === 4 ) { - if ( route.args[2] === "zblock" ) { + else if ( route.args[1] == "route" ) + { + getWelcomeSection().hidden=false; + if ( route.args.length === 4 ) + { + if ( route.args[2] === "zblock" ) + { seekZblock(route.args[3], ['search', false]); } } - } else if ( (locationHashGetter() !== 'undefined') && ( menuids().includes(route.menuid))){ + } + else if ( (locationHashGetter() !== 'undefined') && ( menuids().includes(route.menuid))) + { document.querySelector(route.menuid).hidden=false; - } else { + } + else + { getSoftError().hidden=false; } } -- cgit v1.2.3