mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Added Verification Badge to Youtube Comments
This commit is contained in:
parent
c584e31657
commit
154bca4635
1 changed files with 5 additions and 2 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue