X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=8db8b695b93b68c2187af45978e1fe4e8a07e6c0;hb=HEAD;hp=fe30cc65f11171a521888cdefdf0eb6807671d30;hpb=f1ccf40501329b443f6f7848700f468bf1a61d77;p=zombocom-ai diff --git a/index.html b/index.html index fe30cc6..8db8b69 100644 --- a/index.html +++ b/index.html @@ -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";