diff --git a/js/index.js b/js/index.js index 65e6d0a..9cd0083 100644 --- a/js/index.js +++ b/js/index.js @@ -1,9 +1,8 @@ -let scripts = []; let client_id = "68fd42deb929a87fc8b9"; let redirect_uri = "https://oauth.conchbrain.club/redirect"; let userInfo = undefined; let isDarkMode = false; -let currentView = 'index' +let onNavigation = undefined function login() { let href = `https://github.com/login/oauth/authorize?client_id=${client_id}&redirect_uri=${redirect_uri}`; @@ -68,7 +67,7 @@ function guid() { } function navigation(name, isBack = false) { - if (window.onNavigation) window.onNavigation(name, isBack) + if (onNavigation) onNavigation(name, isBack) window.scrollTo(0, 0); loadingState(true); @@ -88,7 +87,6 @@ function navigation(name, isBack = false) { navigation("notfound"); loadingState(false); } - currentView = name; }); } diff --git a/view/cloudshell.html b/view/cloudshell.html index ef6da93..e496d77 100644 --- a/view/cloudshell.html +++ b/view/cloudshell.html @@ -3,8 +3,9 @@ \ No newline at end of file