Display profile icons
This commit is contained in:
parent
fde2500ae9
commit
9da8449ee5
|
@ -55,7 +55,7 @@ const config = {
|
||||||
new_page: 60
|
new_page: 60
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
valid_media_domains: ['preview.redd.it', 'external-preview.redd.it', 'i.redd.it', 'v.redd.it', 'a.thumbs.redditmedia.com', 'b.thumbs.redditmedia.com', 'emoji.redditmedia.com', 'thumbs.gfycat.com', 'i.ytimg.com'],
|
valid_media_domains: ['preview.redd.it', 'external-preview.redd.it', 'i.redd.it', 'v.redd.it', 'a.thumbs.redditmedia.com', 'b.thumbs.redditmedia.com', 'emoji.redditmedia.com', 'styles.redditmedia.com', 'www.redditstatic.com', 'thumbs.gfycat.com', 'i.ytimg.com'],
|
||||||
valid_embed_video_domains: ['gfycat.com', 'youtube.com'],
|
valid_embed_video_domains: ['gfycat.com', 'youtube.com'],
|
||||||
reddit_api_error_text: `Seems like your instance is either blocked (e.g. due to API rate limiting), reddit is currently down, or your API key is expired and not renewd properly. This can also happen for other reasons.`
|
reddit_api_error_text: `Seems like your instance is either blocked (e.g. due to API rate limiting), reddit is currently down, or your API key is expired and not renewd properly. This can also happen for other reasons.`
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,6 +51,8 @@ module.exports = function(tools) {
|
||||||
dir = 'thumbs/'
|
dir = 'thumbs/'
|
||||||
if(file_prefix === 'flair_')
|
if(file_prefix === 'flair_')
|
||||||
dir = 'flairs/'
|
dir = 'flairs/'
|
||||||
|
if(file_prefix === 'icon_')
|
||||||
|
dir = 'icons/'
|
||||||
|
|
||||||
if(valid_video_extensions.includes(file_ext) || gifmp4) {
|
if(valid_video_extensions.includes(file_ext) || gifmp4) {
|
||||||
/* Is video. */
|
/* Is video. */
|
||||||
|
|
|
@ -99,7 +99,7 @@ module.exports = function() {
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
username: about.name,
|
username: about.name,
|
||||||
icon_img: about.icon_img,
|
icon_img: await downloadAndSave(about.icon_img, "icon_"),
|
||||||
created: about.created_utc,
|
created: about.created_utc,
|
||||||
verified: about.verified,
|
verified: about.verified,
|
||||||
link_karma: about.link_karma,
|
link_karma: about.link_karma,
|
||||||
|
|
|
@ -4,4 +4,5 @@
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!flairs/
|
!flairs/
|
||||||
!thumbs/
|
!thumbs/
|
||||||
|
!icons/
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ html
|
||||||
li(class=past === 'all' ? 'active' : '')
|
li(class=past === 'all' ? 'active' : '')
|
||||||
a(href="?sort=" + sortby + "&t=all") all time
|
a(href="?sort=" + sortby + "&t=all") all time
|
||||||
.info
|
.info
|
||||||
|
img(src=data.icon_img)
|
||||||
h1 #{data.username}
|
h1 #{data.username}
|
||||||
p(class="user-stat") <span>#{kFormatter(data.link_karma)}</span> post karma
|
p(class="user-stat") <span>#{kFormatter(data.link_karma)}</span> post karma
|
||||||
p(class="user-stat") <span>#{kFormatter(data.comment_karma)}</span> comment karma
|
p(class="user-stat") <span>#{kFormatter(data.comment_karma)}</span> comment karma
|
||||||
|
|
Loading…
Reference in New Issue