From 7dafe9777c264513be584787b504ad2a92057b99 Mon Sep 17 00:00:00 2001 From: Timon Ostertun Date: Tue, 22 Sep 2020 23:39:25 +0200 Subject: [PATCH] Small Fixes --- client/scripts/regatten.js.php | 10 ++++++---- index.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 70c3e08..be8a90e 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -8,7 +8,7 @@ const QUERY_URL = '/api/'; const BOATCLASS = ''; -const LINK_PRE = ''; +const LINK_PRE = '/'; var randomId = function() { return '_' + Math.random().toString(36).substr(2, 9); } @@ -225,11 +225,13 @@ var initRegatten = function() { initDatabase(); - if (isLoggedIn) { - $('.show-notloggedin').css('display', 'none'); + if (isLoggedIn()) { + $('.show-loggedin').show(); + $('.show-notloggedin').hide(); $('.replace-userid-href').attr('href', $('.replace-userid-href').attr('href').replace('%USERID%', USER_ID)); $('.replace-username').html(USER_NAME); } else { - $('.show-loggedin').css('display', 'none'); + $('.show-loggedin').hide(); + $('.show-notloggedin').show(); } } \ No newline at end of file diff --git a/index.php b/index.php index cdad4b6..4f9a677 100644 --- a/index.php +++ b/index.php @@ -21,7 +21,7 @@ $site = 'index'; } - define('LINK_PRE', SERVER_ADDR . '/');; + define('LINK_PRE', SERVER_ADDR . '/'); if (!file_exists(__DIR__ . '/content/' . $site . '.php')) { $site = '404';