]> git.cworth.org Git - zombocom-ai/commitdiff
Make the censored images more obvious in the stream
authorCarl Worth <cworth@cworth.org>
Mon, 19 Dec 2022 07:26:44 +0000 (23:26 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 19 Dec 2022 07:26:44 +0000 (23:26 -0800)
By hiding the image and caption still, but leaving the comments
(including the explanation of censorship) still visibile.

index.html

index 27035a180506b124661ef9efd3992c11b1e6f6b6..fe30cc65f11171a521888cdefdf0eb6807671d30 100644 (file)
@@ -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);
         }