]> git.cworth.org Git - zombocom-ai/blobdiff - index.html
Reword Coda's final message
[zombocom-ai] / index.html
index fe30cc65f11171a521888cdefdf0eb6807671d30..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);
@@ -176,7 +182,15 @@ mute.addEventListener("click", () => {
 
         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";