From 1f6d85a072887519a4923875ff64ab25668f64f5 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt-Bilkenroth Date: Thu, 16 Nov 2023 14:45:16 +0100 Subject: [PATCH] some more refinements --- script.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 9c51f2f..f36fae7 100644 --- a/script.js +++ b/script.js @@ -125,7 +125,7 @@ const updateCarousel = function(slides, posts) { ` for( let i = 0; i < posts.length; i++ ) { let post = posts[i]; - console.log( post.content ) + /*console.log( post.content )*/ if ( i == 0 ) { newHTML += `
-
+
${post.media_attachments[0] ? `

${DOMPurify.sanitize(post.content)}

` : `

${DOMPurify.sanitize(post.content)}

`} ${post.media_attachments[0] ? `
` : ''}

-

${timeAgo(secondsAgo(new Date(post.created_at)))}, ${post.favourites_count} favorisiert, ${post.replies_count} Antworten, ${post.reblogs_count} geteilt

+

+ ${timeAgo(secondsAgo(new Date(post.created_at)))} + ${post.favourites_count ? `, ${post.favourites_count} mal favorisiert` : '' } + ${post.replies_count ? `, ${post.replies_count} Antworten` : '' } + ${post.reblogs_count ? `, ${post.reblogs_count} mal geteilt` : '' } + +

`; newHTML += '';