From 49c8a92c51a47bb2baa5021821335ca8b1407042 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Sun, 29 Dec 2024 10:48:40 +0000 Subject: [PATCH] use new attachment redacted thumbnail --- script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index d13de2d..3b078e3 100644 --- a/script.js +++ b/script.js @@ -520,7 +520,11 @@ function mkSpamImgElement(img_description) { console.log('img_description.illegal', img_description.illegal); if (illegal) { - thumb_url = "/static/image_redacted.jpg"; + if (mime.startsWith("image")) { + thumb_url = "/static/image_redacted.jpg"; + } else { + thumb_url = "/static/attachment_redacted.jpg"; + } } else if (MIME_THUMBNAILS[mime] != null) { thumb_url = MIME_THUMBNAILS[mime]; } else {