forked from sam/fedifeed
started very poorly implementing emojis in posts
This commit is contained in:
parent
2d3e4ede87
commit
8063fd6680
5 changed files with 9772 additions and 2142 deletions
|
@ -113,7 +113,6 @@ function metaForUser(user) {
|
|||
async function itemsForFeed(opts,user,feed) {
|
||||
|
||||
let items = feed.orderedItems;
|
||||
|
||||
if (opts.boosts){
|
||||
// yes, I have to fetch all the fucking boosts for this whole feed apparently >:/
|
||||
let boostData = [];
|
||||
|
@ -178,6 +177,9 @@ async function itemsForFeed(opts,user,feed) {
|
|||
|
||||
let op = item._userdata?item._userdata:user;
|
||||
|
||||
//let regexp = /s*(?<=:).+?(?=:)s*/;
|
||||
//const itemEmochi = item.object&&item.object.content?item.object.content:"";
|
||||
|
||||
return {
|
||||
isBoost:!!item._userdata,
|
||||
title:item._userdata?user.preferredUsername+" shared a status by "+op.preferredUsername:"",
|
||||
|
|
|
@ -72,7 +72,11 @@
|
|||
<input type="checkbox" class="showmore" id="<%- cwId %>">
|
||||
<label class="button" for="<%- cwId %>">Show</label>
|
||||
<% } %>
|
||||
|
||||
<% let regexp = /s*(?<=:).+?(?=:)s*/;
|
||||
let postWithEmoji = item.content;
|
||||
item.content = postWithEmoji.replace(regexp, "<img src=https://freecumextremist.com/emoji/emojos/hapy.jpg width='30' height='30'/>")
|
||||
console.log(item.content);
|
||||
%>
|
||||
<div class="item-content">
|
||||
<%- item.content %>
|
||||
</div>
|
||||
|
|
7617
package-lock.json
generated
Normal file
7617
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -67,7 +67,7 @@
|
|||
<h3>Live Preview:</h3>
|
||||
<span class="iframe-contain">
|
||||
<iframe id="frame" allowfullscreen sandbox="allow-top-navigation allow-scripts" width="400" height="800"
|
||||
src="/api/v1/feed?userurl=https%3A%2F%2Fmastodon.social%2Fusers%2Fgargron&replies=false&boosts=true">></iframe>
|
||||
src="/api/v1/feed?userurl=https%3A%2F%2Ffreecumextremist.com%2Fusers%2Fgrumbulon&replies=false&boosts=true">></iframe>
|
||||
</span>
|
||||
<br>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue