diff options
author | Akshay <[email protected]> | 2024-12-05 21:12:59 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2024-12-05 21:12:59 +0000 |
commit | 8dba8a8375ac69b2547a31c9db41a71964ed186c (patch) | |
tree | 5ac4e5790c829ae9fb244305290edc19795656ed /src/views/comments.pug | |
parent | d214040c0b4a7dcd7dd386e0169b77a1c74de489 (diff) |
add urls to open comments and submissions externally
Diffstat (limited to 'src/views/comments.pug')
-rw-r--r-- | src/views/comments.pug | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/views/comments.pug b/src/views/comments.pug index bbd7855..8fde1ce 100644 --- a/src/views/comments.pug +++ b/src/views/comments.pug | |||
@@ -25,11 +25,17 @@ html | |||
25 | a(href=`/r/${post.subreddit}`) ← r/#{post.subreddit} | 25 | a(href=`/r/${post.subreddit}`) ← r/#{post.subreddit} |
26 | 26 | ||
27 | div.info-container | 27 | div.info-container |
28 | - var domain = (new URL(post.url)).hostname | ||
28 | p | 29 | p |
29 | | #{fmtnum(post.ups)} ↑ | 30 | | #{fmtnum(post.ups)} ↑ |
30 | | · by u/#{post.author} | 31 | | · by u/#{post.author} |
31 | | · | 32 | | · |
32 | | #{timeDifference(Date.now(), post.created * 1000)} | 33 | | #{timeDifference(Date.now(), post.created * 1000)} |
34 | | · | ||
35 | if domain !== 'www.reddit.com' | ||
36 | a(href=`${post.url}`) submission url ↗ | ||
37 | | · | ||
38 | a(href=`https://reddit.com${post.permalink}`) reddit ↗ | ||
33 | 39 | ||
34 | h2.post-title | 40 | h2.post-title |
35 | != post.title | 41 | != post.title |