1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-08 04:55:37 -05:00

Merge branch 'original-image-urls'

This commit is contained in:
Zed
2022-06-04 00:47:56 +02:00
3 changed files with 23 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ import general
proc getSmallPic(url: string): string =
result = url
if "?" notin url and not url.endsWith("placeholder.png"):
result &= ":small"
result &= "?name=small"
result = getPicUrl(result)
proc renderMiniAvatar(user: User; prefs: Prefs): VNode =
@@ -57,9 +57,9 @@ proc renderAlbum(tweet: Tweet): VNode =
tdiv(class="attachment image"):
let
named = "name=" in photo
orig = if named: photo else: photo & "?name=orig"
orig = photo
small = if named: photo else: photo & "?name=small"
a(href=getPicUrl(orig), class="still-image", target="_blank"):
a(href=getOrigPicUrl(orig), class="still-image", target="_blank"):
genImg(small)
proc isPlaybackEnabled(prefs: Prefs; video: Video): bool =