]> git.cworth.org Git - zombocom-ai/blobdiff - index.html
Fix typo
[zombocom-ai] / index.html
index b7b82de7068bedb0c4b3f1910ee11c2e78c2867d..931efa6c327f18e1dd65dc150709b3f48ff88729 100644 (file)
@@ -24,7 +24,7 @@
     </div>
 
     <p>
-      Welcome to Zombocom. You can do anything at Zombcom, anything at
+      Welcome to Zombocom. You can do anything at Zombocom, anything at
       all. The only limit is yourself!
     </p>
 
         </div>
 
         <div class="form-row small left">
-          <label for="code">
-            Numeric code
-          </label>
-          <input id="code" type="text" size="10" autocomplete="off" placeholder="(Chosen randomly)" />
+          <div class="labeled-row">
+            <label for="code">
+              Numeric code: 
+            </label>
+            <input id="code" type="text" autocomplete="off" placeholder="(Leave blank for random)" />
+          </div>
         </div>
 
         <div class="form-row small right">
@@ -64,6 +66,9 @@
       </form>
     </p>
 
+    <ul id="comments">
+    </ul>
+
     <p>
       <form action="" id="comment-form">
         <input id="comment" type="text" style="width:100%" autocomplete="off" placeholder="Add a comment" />
@@ -107,6 +112,7 @@ mute.addEventListener("click", () => {
   <script>
     var socket = io();
 
+    var comments = document.querySelector("#comments");
     var form = document.querySelector("#comment-form");
     var comment = document.querySelector("#comment");
 
@@ -117,6 +123,12 @@ mute.addEventListener("click", () => {
             comment.value = '';
         }
     });
+
+    socket.on('comment', function(msg) {
+        var item = document.createElement('li');
+        item.textContent = msg;
+        comments.appendChild(item);
+    });
   </script>
 </body>
 </html>