diff options
Diffstat (limited to 'src/main.js')
-rw-r--r-- | src/main.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.js b/src/main.js index f970abc..6f5b02a 100644 --- a/src/main.js +++ b/src/main.js @@ -309,6 +309,20 @@ async function update_name_form() { } +window.onload = async function() { + // if not on a user page + if (window.location.pathname.indexOf("/user") == -1) { + console.log("NOT A USER PAGE") + // and if logged in + if (await is_logged_in()) { + // move to the user index page + window.location.href = host + "/user/" + } + } else if (window.location.pathname == "/user/") { + await user() + } +} + async function delete_form() { const id = get_id(); const session = get_session(); |