diff --git a/public_html/index.php b/public_html/index.php index 38bc2e7..cf1adcc 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -12,19 +12,18 @@ $token = $_SESSION['jarvis_token']; $name = $_SESSION['jarvis_name'] ?? ''; $html = file_get_contents(__DIR__ . '/index.html'); -// 1. Inject token as JS globals — no sessionStorage dependency +// Inject token as JS globals — __jarvisToken/__jarvisUser only (no var sessionToken/sessionUser +// which would conflict with the main script's `let` declarations and cause a SyntaxError) $inject = ''; $html = str_replace('', '' . $inject, $html); -// 2. Force login screen HIDDEN and app VISIBLE at the HTML level -// so even if JS fails the user sees the dashboard, not the login form +// Force login screen hidden and app visible at HTML level so the dashboard +// shows immediately regardless of JS execution order $html = str_replace( '
', '
',