mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-27 18:40:21 +05:30
feat: replace View channel on YouTube and channel's description external links
This commit is contained in:
parent
0fd38e52ef
commit
effb642948
@ -159,6 +159,9 @@ def get_about_info(ucid, locale) : AboutChannel
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# use comments link_utils to replace external links with the confirmation page
|
||||||
|
description_html = Invidious::Comments.replace_external_links(description_html)
|
||||||
|
|
||||||
sub_count = 0
|
sub_count = 0
|
||||||
|
|
||||||
if (metadata_rows = initdata.dig?("header", "pageHeaderRenderer", "content", "pageHeaderViewModel", "metadata", "contentMetadataViewModel", "metadataRows").try &.as_a)
|
if (metadata_rows = initdata.dig?("header", "pageHeaderRenderer", "content", "pageHeaderViewModel", "metadata", "contentMetadataViewModel", "metadataRows").try &.as_a)
|
||||||
|
@ -37,7 +37,10 @@
|
|||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1-2">
|
<div class="pure-u-1-2">
|
||||||
<div class="pure-u-1 pure-md-1-3">
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
<a href="<%= youtube_url %>"><%= translate(locale, "View channel on YouTube") %></a>
|
<%-
|
||||||
|
confirm_view_yt = "/confirm_leave?link=#{URI.encode_path(youtube_url)}"
|
||||||
|
-%>
|
||||||
|
<a href="<%= confirm_view_yt %>"><%= translate(locale, "View channel on YouTube") %></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-md-1-3">
|
<div class="pure-u-1 pure-md-1-3">
|
||||||
<a href="<%= redirect_url %>"><%= translate(locale, "Switch Invidious Instance") %></a>
|
<a href="<%= redirect_url %>"><%= translate(locale, "Switch Invidious Instance") %></a>
|
||||||
|
Loading…
Reference in New Issue
Block a user