feat: mastodon-post web component

This commit is contained in:
Cory Dransfeldt 2024-02-19 11:19:38 -08:00
parent e0f6c26000
commit 6b65a517c5
No known key found for this signature in database
7 changed files with 64 additions and 7 deletions

View file

@ -111,7 +111,9 @@ export default {
// links
findPost: (url, posts) => {
if (!url || !posts) return null;
return posts[url]?.toots?.[0] || null;
const BASE_URL = 'https://social.lol/users/cory/statuses/'
const STATUS_URL = 'https://social.lol/@cory/'
return posts[url]?.toots?.[0].replace(BASE_URL, STATUS_URL) || null;
},
absoluteUrl: (url, base) => {
if (!base) base = metaData.url