no timestamps on mobile, fixed git button, added reconnections
This commit is contained in:
14
script.js
14
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') + '<span style="color:#f00">Disconnected.</span>');
|
||||
addMessage('Status', chatNick('!!!', '#f00') + '<span style="color:#f00">Disconnected. Reconnecting in 15 seconds...</span>');
|
||||
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') + '<span style="color:#888">Attempting to reconnect...</span>');
|
||||
connect();
|
||||
}, 15000);
|
||||
};
|
||||
|
||||
ws.onerror = function () {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user