diff --git a/src/invidious/frontend/comments_youtube.cr b/src/invidious/frontend/comments_youtube.cr index 93edffdc..5e9faece 100644 --- a/src/invidious/frontend/comments_youtube.cr +++ b/src/invidious/frontend/comments_youtube.cr @@ -157,8 +157,10 @@ module Invidious::Frontend::Comments | END_HTML elsif comments["authorId"]? + permalink = "https://www.youtube.com/channel/#{comments["authorId"]}/community?lb=#{child["commentId"]}" + permalink_confirm = "/confirm_leave?link=#{URI.encode_path(permalink)}" html << <<-END_HTML - [YT] + [YT] | END_HTML end diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index b2df682d..c8e360dc 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -180,6 +180,9 @@ def error_redirect_helper(env : HTTP::Server::Context) go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") switch_instance = translate(locale, "Switch Invidious Instance") + youtube_link = "https://youtube.com#{env.request.resource}" + youtube_link_confirm = "/confirm_leave?link=#{URI.encode_path(youtube_link)}" + return <<-END_HTML
#{next_steps_text}