mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-26 09:09:27 +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)
|
if(is_self_link)
|
||||||
link.url = link.permalink
|
link.url = link.permalink
|
||||||
|
|
||||||
|
if(req.query.hasOwnProperty('full_thumbs'))
|
||||||
|
thumbnail = post_image
|
||||||
|
|
||||||
let enclosure = ''
|
let enclosure = ''
|
||||||
if(thumbnail != '') {
|
if(thumbnail != '') {
|
||||||
let mime = ''
|
let mime = ''
|
||||||
@ -68,11 +71,6 @@ module.exports = function() {
|
|||||||
enclosure = `<enclosure length="0" type="${mime}" url="${thumbnail}" />`
|
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>`
|
let append_desc_html = `<br/><a href="${link.url}">[link]</a> <a href="${link.permalink}">[comments]</a>`
|
||||||
|
|
||||||
items += `
|
items += `
|
||||||
@ -85,7 +83,6 @@ module.exports = function() {
|
|||||||
<id>${link.id}</id>
|
<id>${link.id}</id>
|
||||||
<thumbnail>${thumbnail}</thumbnail>
|
<thumbnail>${thumbnail}</thumbnail>
|
||||||
${enclosure}
|
${enclosure}
|
||||||
${image}
|
|
||||||
<link>${link.permalink}</link>
|
<link>${link.permalink}</link>
|
||||||
<url>${link.url}</url>
|
<url>${link.url}</url>
|
||||||
<description><![CDATA[${unescape(link.selftext_html)}${append_desc_html}]]></description>
|
<description><![CDATA[${unescape(link.selftext_html)}${append_desc_html}]]></description>
|
||||||
|
Loading…
Reference in New Issue
Block a user