add option to show full post images in the rss feeds with full_thumbs query

This commit is contained in:
teddit 2021-03-27 16:58:56 +01:00
parent a143eeb2fe
commit 4790074c30
1 changed files with 3 additions and 6 deletions

View File

@ -57,6 +57,9 @@ module.exports = function() {
if(is_self_link)
link.url = link.permalink
if(req.query.hasOwnProperty('full_thumbs'))
thumbnail = post_image
let enclosure = ''
if(thumbnail != '') {
let mime = ''
@ -68,11 +71,6 @@ module.exports = function() {
enclosure = `<enclosure length="0" type="${mime}" url="${thumbnail}" />`
}
let image = ''
if(post_image != '') {
image = `<image>${post_image}</image>`
}
let append_desc_html = `<br/><a href="${link.url}">[link]</a> <a href="${link.permalink}">[comments]</a>`
items += `
@ -85,7 +83,6 @@ module.exports = function() {
<id>${link.id}</id>
<thumbnail>${thumbnail}</thumbnail>
${enclosure}
${image}
<link>${link.permalink}</link>
<url>${link.url}</url>
<description><![CDATA[${unescape(link.selftext_html)}${append_desc_html}]]></description>