Commented this wacky shit

This commit is contained in:
grumbulon 2022-04-13 23:41:40 -04:00
parent 1b6346f1b3
commit c222b50cbd

View file

@ -72,8 +72,14 @@
<input type="checkbox" class="showmore" id="<%- cwId %>">
<label class="button" for="<%- cwId %>">Show</label>
<% } %>
<!--
Ok so this is so fucked but basically, this matches a status with the regex expression (to capture text between two colons) and
needs to take the matched text and search the instances emoji pack for the value and replace it in item content.
I tested this and it _does not_ alter posts without emojis.
-->
<% let regexp = /s*(?<=:).+?(?=:)s*/;
let postWithEmoji = item.content;
<!--If a post with matching regex for :whatever: is found replace with img tag for the instance's emoji packs-->
item.content = postWithEmoji.replace(regexp, "<img src=https://freecumextremist.com/emoji/emojos/hapy.jpg width='30' height='30'/>")
console.log(item.content);
%>