mirror of
https://codeberg.org/teddit/teddit
synced 2025-02-16 20:20:36 +01:00
Update processJsonPost.js to store a preview selftext
This commit is contained in:
parent
064c97579e
commit
319fa35d5f
@ -155,6 +155,7 @@ async function processJsonPost(json, parsed, user_preferences) {
|
|||||||
images: null,
|
images: null,
|
||||||
crosspost: false,
|
crosspost: false,
|
||||||
selftext: unescape(post.selftext_html),
|
selftext: unescape(post.selftext_html),
|
||||||
|
selftext_preview: post.selftext.substr(0, 120),
|
||||||
poll_data: post.poll_data,
|
poll_data: post.poll_data,
|
||||||
link_flair:
|
link_flair:
|
||||||
user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '',
|
user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
meta(property='og:title', content=cleanTitle(post.title) + ' : r/' + subreddit)
|
meta(property='og:title', content=cleanTitle(post.title) + ' : r/' + subreddit)
|
||||||
meta(property='og:description', content='' + post.selftext)
|
meta(property='og:description', content='' + post.selftext_preview)
|
||||||
meta(property='og:author_name', content='u/' + post.author)
|
meta(property='og:author_name', content='u/' + post.author)
|
||||||
if !post.has_media
|
if !post.has_media
|
||||||
if post.gallery
|
if post.gallery
|
||||||
|
Loading…
x
Reference in New Issue
Block a user