From 4fd156c4a6007c915fe240a0fef912418d106489 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 Jun 2024 01:44:38 -0600 Subject: [PATCH] Update profile embeds, add support for albums --- resources/views/profile/embed.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/profile/embed.blade.php b/resources/views/profile/embed.blade.php index 98b8b2692..d0edb9f59 100644 --- a/resources/views/profile/embed.blade.php +++ b/resources/views/profile/embed.blade.php @@ -15,7 +15,7 @@ - +
@@ -76,11 +76,13 @@ .then(res => res.json()) .then(res => { let parent = document.querySelector('.embed-row'); - res.filter(post => post.pf_type == 'photo' && !post.sensitive && post.visibility === 'public') + res.filter(post => ['photo', 'photo:album'].includes(post.pf_type) && !post.sensitive && post.visibility === 'public') .slice(0, 9) .forEach((post, idx) => { let mediaUrl = post.media_attachments[0].preview_url ? post.media_attachments[0].preview_url : post.media_attachments[0].url; - let html = `
`; + let html = post.pf_type === 'photo:album' ? + `
` : + `
`; let el = document.createElement('div'); el.innerHTML = html; parent.appendChild(el.firstChild);