By hiding the image and caption still, but leaving the comments
(including the explanation of censorship) still visibile.
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}) `);
window.scrollTo(0,0);
});
+ if (image.censored) {
+ figcaption.style.display = "none";
+ }
+
figure.appendChild(figcaption);
}