<% } %>
<%
// One card for both: a fediverse quote and an external embed look
// identical; only where they came from differs. An embed carries a
// title and a thumbnail, never an iframe.
var _quote = noteQuote(p.quote_json);
if (!_quote) {
var _emb = noteQuote(p.embed_json);
// The title comes from a third-party oEmbed provider, so it is
// escaped here: the quote card renders `content` as HTML (fine for
// AP content, which we sanitise on the way in, but not for this).
if (_emb) _quote = { url: _emb.url, author: _emb.author || (_emb.provider ? { name: _emb.provider } : null),
content: _emb.title ? ('
<% } %>
<% vids.forEach(function(m){ %><% }); %>
<% /* A Klonkt audio post carries an embed player (embedHtml/embedUrl) that already
covers these tracks, so don't ALSO render the raw Audio attachments as bare
players here. Posts without a Klonkt embed (e.g. a plain remote audio) keep them. */ %>
<% if (!p.embedHtml && !p.embedUrl) { auds.forEach(function(m){ %><% }); } %>
<% if (_nsfwVisual) { %>
<% } %>
<% if (p.embedUrl) { %>▶ <%= t('tl.open_player') %><% } %>
<% if (p.poll) { var _pl=p.poll; var _tot=_pl.options.reduce(function(s,o){return s+(o.count||0);},0); var _voteable=!_pl.closed&&!_pl.voted; %>
<% if (_voteable) { %>
<% } else { _pl.options.forEach(function(o){ var _pct=_tot?Math.round((o.count||0)*100/_tot):0; var _mine=_pl.voted&&(Array.isArray(_pl.voted)?_pl.voted.indexOf(o.name)>=0:_pl.voted===o.name); %>