From: Carl Worth Date: Mon, 19 Dec 2022 07:26:44 +0000 (-0800) Subject: Make the censored images more obvious in the stream X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=f1ccf40501329b443f6f7848700f468bf1a61d77;p=zombocom-ai Make the censored images more obvious in the stream By hiding the image and caption still, but leaving the comments (including the explanation of censorship) still visibile. --- diff --git a/index.html b/index.html index 27035a1..fe30cc6 100644 --- a/index.html +++ b/index.html @@ -174,14 +174,14 @@ 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.censored) { + img.style.display = "none"; + } + if (image.prompt && image.code) { const figcaption = document.createElement('figcaption'); const caption_text = document.createTextNode(`${image.prompt} (${image.code}) `); @@ -196,6 +196,10 @@ mute.addEventListener("click", () => { window.scrollTo(0,0); }); + if (image.censored) { + figcaption.style.display = "none"; + } + figure.appendChild(figcaption); }