Update processJsonPost.js to store a preview selftext

This commit is contained in:
redmt 2022-06-10 15:42:37 +02:00
parent 064c97579e
commit 319fa35d5f
2 changed files with 2 additions and 1 deletions

View File

@ -155,6 +155,7 @@ async function processJsonPost(json, parsed, user_preferences) {
images: null,
crosspost: false,
selftext: unescape(post.selftext_html),
selftext_preview: post.selftext.substr(0, 120),
poll_data: post.poll_data,
link_flair:
user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '',

View File

@ -1,5 +1,5 @@
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)
if !post.has_media
if post.gallery