diff --git a/script.js b/script.js index af3bfbc..fa94ffb 100644 --- a/script.js +++ b/script.js @@ -104,14 +104,6 @@ const updateTimesOnPage = function() { }); }; -// replace certain emojies in some text with images -const replaceEmojies = (text, emojis) => { - emojis.forEach(emoji => { - text = text.replaceAll(`:${emoji.shortcode}:`, ``); - }); - return text; -}; - // displayPost creates and displays a post const displayPost = function(post) { if (existingPosts.includes(post.id) || (!includeReplies && post.in_reply_to_id !== null)) return 0; @@ -123,10 +115,10 @@ const displayPost = function(post) {
-

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

+

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

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

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

+

${DOMPurify.sanitize(post.content)}

${post.spoiler_text ? `

${DOMPurify.sanitize(post.spoiler_text)}

` : ''}

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

@@ -193,16 +185,16 @@ const updateCarousel = function(slides, posts) { else { newHTML += `