mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 14:59:26 +01:00
add enclosure element
This commit is contained in:
parent
5ca2011786
commit
e49d6e4917
@ -50,6 +50,13 @@ module.exports = function() {
|
||||
|
||||
if(is_self_link)
|
||||
link.url = link.permalink
|
||||
|
||||
let thumb_mime = ''
|
||||
let ext = thumbnail.split('.').pop()
|
||||
if(ext === 'png')
|
||||
thumb_mime = 'image/png'
|
||||
else
|
||||
thumb_mime = 'image/jpeg'
|
||||
|
||||
let append_desc_html = `<br/><a href="${link.url}">[link]</a> <a href="${link.permalink}">[comments]</a>`
|
||||
|
||||
@ -61,6 +68,7 @@ module.exports = function() {
|
||||
<domain>${link.domain}</domain>
|
||||
<id>${link.id}</id>
|
||||
<thumbnail>${thumbnail}</thumbnail>
|
||||
<enclosure length="0" type="${thumb_mime}" url="${thumbnail}" />
|
||||
<link>${link.permalink}</link>
|
||||
<url>${link.url}</url>
|
||||
<description><![CDATA[${unescape(link.selftext_html)}${append_desc_html}]]></description>
|
||||
|
Loading…
Reference in New Issue
Block a user