1
0
mirror of https://github.com/zedeus/nitter synced 2024-11-22 18:07:14 +01:00

Show badges on quoted gifs

This commit is contained in:
Zed 2019-06-25 00:39:32 +02:00
parent 6c5f491ee0
commit d6b8b386fa
2 changed files with 7 additions and 1 deletions

View File

@ -661,7 +661,7 @@ video {
}
.quote-badge {
left: 0px;
left: 6px;
position: absolute;
z-index: 1;
align-self: flex-end;
@ -673,4 +673,6 @@ video {
border-radius: 4px;
color: #fffffff0;
padding: 0px 2px;
font-size: 12px;
font-weight: bold;
}

View File

@ -136,5 +136,9 @@ proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
quote.thumb = some(media.selectAttr("img", "src"))
let badge = node.querySelector(".AdaptiveMedia-badgeText")
let gifBadge = node.querySelector(".Icon--gifBadge")
if not badge.isNil:
quote.badge = some(badge.innerText())
elif not gifBadge.isNil:
quote.badge = some("GIF")