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);
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');
window.scrollTo(0,0);
});
+ if (image.censored) {
+ figcaption.style.display = "none";
+ }
+
figure.appendChild(figcaption);
}