From f1ccf40501329b443f6f7848700f468bf1a61d77 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 18 Dec 2022 23:26:44 -0800 Subject: [PATCH] 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. --- index.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); } -- 2.43.0