diff options
| author | jonas-w <jonas-wunderlich@outlook.com> | 2022-02-03 22:32:00 +0100 |
|---|---|---|
| committer | jonas-w <jonas-wunderlich@outlook.com> | 2022-02-03 22:32:00 +0100 |
| commit | 154bca463554c4305cf616df1e65abbf30136019 (patch) | |
| tree | 425c392dd345706f429cc4d382b27628c0ec778f /src | |
| parent | c584e31657770e206a583972607ca0833fa42c56 (diff) | |
| download | invidious-154bca463554c4305cf616df1e65abbf30136019.tar.gz invidious-154bca463554c4305cf616df1e65abbf30136019.tar.bz2 invidious-154bca463554c4305cf616df1e65abbf30136019.zip | |
Added Verification Badge to Youtube Comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 65f4b135..6febbe45 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -144,7 +144,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b content_html = node_comment["contentText"]?.try { |t| parse_content(t) } || "" author = node_comment["authorText"]?.try &.["simpleText"]? || "" - + verified = node_comment["authorCommentBadge"]? != nil + json.field "verified", verified json.field "author", author json.field "authorThumbnails" do json.array do @@ -328,7 +329,9 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false) end author_name = HTML.escape(child["author"].as_s) - + if child["verified"].as_bool + author_name += "<i class=\"icon ion ion-md-checkmark-circle\"></i>" + end html << <<-END_HTML <div class="pure-g" style="width:100%"> <div class="channel-profile pure-u-4-24 pure-u-md-2-24"> |
