diff --git a/script.js b/script.js
index 13f72c7..35894b2 100644
--- a/script.js
+++ b/script.js
@@ -25,6 +25,7 @@
let showChanlist = true;
let showNicklist = true;
let notificationsEnabled = false;
+ let reconnectTimer = null;
// --- Notification sound (short beep generated via AudioContext) ---
let audioCtx = null;
@@ -929,9 +930,20 @@
};
ws.onclose = function () {
- addMessage('Status', chatNick('!!!', '#f00') + 'Disconnected.');
+ addMessage('Status', chatNick('!!!', '#f00') + 'Disconnected. Reconnecting in 15 seconds...');
registered = false;
updateStatusBar();
+
+ // Clear any existing reconnect timer
+ if (reconnectTimer) {
+ clearTimeout(reconnectTimer);
+ }
+
+ // Attempt to reconnect after 15 seconds
+ reconnectTimer = setTimeout(function () {
+ addMessage('Status', chatNick('***', '#888') + 'Attempting to reconnect...');
+ connect();
+ }, 15000);
};
ws.onerror = function () {
diff --git a/style.css b/style.css
index 49f8b29..32d8a26 100644
--- a/style.css
+++ b/style.css
@@ -243,13 +243,14 @@ body {
}
#statusbar-link {
- flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: #555;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
+ padding: 2px 4px;
+ margin: 0 auto;
}
#statusbar-link:hover {
@@ -397,4 +398,8 @@ body {
font-size: 11px;
padding: 2px 6px;
}
+
+ .timestamp {
+ display: none;
+ }
}