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 += '';