mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 06:49:26 +01:00
add option to show full post images in the rss feeds with full_thumbs query
This commit is contained in:
parent
a143eeb2fe
commit
4790074c30
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user