diff --git a/script.js b/script.js index 2fa9d2c..4b690db 100644 --- a/script.js +++ b/script.js @@ -125,7 +125,11 @@ const displayPost = function(post) {

${replaceEmojies(DOMPurify.sanitize(post.account.display_name), post.account.emojis)} @${DOMPurify.sanitize(post.account.acct)}

- ${post.media_attachments[0] ? `` : ''} + ${post.media_attachments[0] ? + (post.media_attachments[0].url.endsWith('.mp4') ? + `` : + ``) : + ''}

${replaceEmojies(DOMPurify.sanitize(post.content), post.emojis)}

${post.spoiler_text ? `

${DOMPurify.sanitize(post.spoiler_text)}

` : ''}

${timeAgo(secondsAgo(new Date(post.created_at)))}

@@ -203,7 +207,12 @@ const updateCarousel = function(slides, posts) {
700 ? `style="font-size: ${strip(postContent).length > 1000 ? `0.5`:`0.9`}em;"`: ``}>${postContent}
- ${post.media_attachments[0] ? `
` : ''} + ${post.media_attachments[0] ? + (post.media_attachments[0].url.endsWith('.mp4') ? + `
` : + `
`) : + ''} +