X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=fe30cc65f11171a521888cdefdf0eb6807671d30;hb=f1ccf40501329b443f6f7848700f468bf1a61d77;hp=27035a180506b124661ef9efd3992c11b1e6f6b6;hpb=c2104f4577e84ffbabade57a63b77035efd78e1c;p=zombocom-ai 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); }