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';