diff mrjunejune/test/snapshots/talk.snapshot @ 145:c1eab8c0b0f9

[MrJuneJune] Small improvement UX and tests passes now.
author June Park <parkjune1995@gmail.com>
date Fri, 09 Jan 2026 13:42:35 -0800
parents f7860f491a8c
children 1c0878eb17de
line wrap: on
line diff
--- a/mrjunejune/test/snapshots/talk.snapshot	Fri Jan 09 13:19:56 2026 -0800
+++ b/mrjunejune/test/snapshots/talk.snapshot	Fri Jan 09 13:42:35 2026 -0800
@@ -16,6 +16,7 @@
 <!-- <link rel="preload" href="/public/fonts/more-sugar.extras.otf" as="font" type="font/otf" crossorigin> -->
 <link rel="preload" href="/public/fonts/more-sugar.regular.otf" as="font" type="font/otf" crossorigin>
 <link rel="preload" href="/public/fonts/more-sugar.thin.otf" as="font" type="font/otf" crossorigin>
+<link rel="preload" href="/public/epi_all_colors.svg" as="image" crossorigin>
 
 <link rel="preload" href="/base.css" as="style" />
 <link rel="stylesheet" href="/base.css" />
@@ -167,20 +168,25 @@
 <script src="/index.js"></script>
 
 
-  <h1>Talks</h1>
+  <main>
+    <h1>Talk with strangers xDDD</h1>
 
-  <div id="messages"></div>
+    <div id="messages"></div>
 
-  <div id="chat">
-    <input type="text" id="messageInput" placeholder="Type a message...">
-    <button id="sendBtn">Send</button>
-  </div>
+    <div id="chat">
+      <input type="text" id="messageInput" placeholder="Type a message...">
+      <button id="sendBtn">Send</button>
+    </div>
+  </main>
   <div style="display: flex; align-items: center; justify-content: center; margin: 30px 0px;">
   <small>&copy; 2026 June Park</small>
 </div>
 
   <script>
-    const ws = new WebSocket('ws://localhost:6969/echo');
+    const host = window.location.hostname;
+    const port = '6969';
+    const url = host === "mrjunejune.com" ? `wss://${host}/echo` : `ws://${host}:${port}/echo`;
+    const ws = new WebSocket(url);
     const messagesDiv = document.getElementById('messages');
 
     ws.onopen = () => {
@@ -214,8 +220,8 @@
     messageInput.addEventListener('keydown', (event) => {
       if (event.key === 'Enter' && !event.shiftKey)
       {
-      event.preventDefault();
-      sendBtn.click();
+        event.preventDefault();
+        sendBtn.click();
       }
     });
   </script>