]> git.cworth.org Git - zombocom-ai/blobdiff - index.html
Reword Coda's final message
[zombocom-ai] / index.html
index 27035a180506b124661ef9efd3992c11b1e6f6b6..8db8b695b93b68c2187af45978e1fe4e8a07e6c0 100644 (file)
@@ -139,6 +139,12 @@ mute.addEventListener("click", () => {
         comments.appendChild(dd);
     }
 
+    // When we enter the endgame, we disable the art-generation form,
+    // (just hide it)
+    socket.on('endgame', () => {
+       zombo_form.style.display = "none";
+    });
+
     socket.on('comment', function(comment) {
         const comments = document.querySelector("#comments_" + comment.image_id);
         add_comment(comments, comment);
@@ -174,13 +180,21 @@ mute.addEventListener("click", () => {
         const figure = document.createElement('figure');
         figure.id = "image_" + image.id;
 
-        if (image.censored) {
-            figure.style.display = "none";
-        }
-
         const img = document.createElement('img');
         img.src = image.filename;
-        figure.appendChild(img);
+
+        if (image.link) {
+            const a = document.createElement('a');
+            a.href = image.link;
+            a.appendChild(img);
+            figure.appendChild(a);
+        } else {
+            figure.appendChild(img);
+        }
+
+        if (image.censored) {
+            img.style.display = "none";
+        }
 
         if (image.prompt && image.code) {
             const figcaption = document.createElement('figcaption');
@@ -196,6 +210,10 @@ mute.addEventListener("click", () => {
                 window.scrollTo(0,0);
             });
 
+            if (image.censored) {
+                figcaption.style.display = "none";
+            }
+
             figure.appendChild(figcaption);
         }