Changeset 781d613 in Klonkt
- Timestamp:
- 06/26/2026 04:14:23 PM (2 months ago)
- Branches:
- main
- Children:
- bca83f3
- Parents:
- d22b55c
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
rd22b55c r781d613 609 609 if (!slug || slug.indexOf('/') >= 0) return null; // single segment only 610 610 const src = u.origin + '/embed?post=' + encodeURIComponent(slug); 611 return { origin: u.origin, html: `<iframe class="tl-embed-frame tl-embed-klonkt" src="${src}" title="Audio" loading="lazy" frameborder="0" allow="autoplay; encrypted-media"></iframe>` }; 611 // Drop the now-redundant "🎵 … listen on <site>" line — the embedded player below shows it. 612 const content = html.replace(/<p>🎵[\s\S]*?<\/p>\s*/i, ''); 613 return { origin: u.origin, content, html: `<iframe class="tl-embed-frame tl-embed-klonkt" src="${src}" title="Audio" loading="lazy" frameborder="0" allow="autoplay; encrypted-media"></iframe>` }; 612 614 } 613 615 … … 617 619 const timeline = (site ? ActivityPubService.getTimeline(site.slug, 60) : []).map((p) => { 618 620 let embedHtml = timelineEmbedHtml(p.content); 621 let content = p.content; 619 622 if (!embedHtml) { 620 623 const k = klonktAudioEmbed(p.content, p.url); 621 if (k) { embedHtml = k.html; c spOrigins.add(k.origin); }624 if (k) { embedHtml = k.html; content = k.content; cspOrigins.add(k.origin); } 622 625 } 623 return { ...p, embedHtml };626 return { ...p, content, embedHtml }; 624 627 }); 625 628 // Option A: allow the followed Klonkt sites' player iframes (you follow them) by
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)