diff --git a/public/app.js b/public/app.js index 15a112b..c6ccd2f 100644 --- a/public/app.js +++ b/public/app.js @@ -275,11 +275,14 @@ document.getElementById('logoutBtn').addEventListener('click', async () => { ui.showLogin(); }); -document.getElementById('styleToggleBtn').addEventListener('click', () => { - const next = ui.getMessageStyle() === 'classic' ? 'bubbles' : 'classic'; - ui.setMessageStyle(next); - ui.renderMessages(state); -}); +const styleToggleBtn = document.getElementById('styleToggleBtn'); +if (styleToggleBtn) { + styleToggleBtn.addEventListener('click', () => { + const next = ui.getMessageStyle() === 'classic' ? 'bubbles' : 'classic'; + ui.setMessageStyle(next); + ui.renderMessages(state); + }); +} document.getElementById('messageForm').addEventListener('submit', async (e) => { e.preventDefault(); diff --git a/public/index.html b/public/index.html index 14419f1..44abc6b 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Web OSCAR Chat - +
@@ -13,7 +13,6 @@
-
@@ -87,6 +86,6 @@
- +