From 10b4bfa315fa2a7fa82ddb1fdc6127532160a916 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Wed, 2 Apr 2025 19:53:34 -0300 Subject: [PATCH] Only show embed link on error pages if `v` query param is present --- src/invidious/helpers/errors.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index b072f934..ae9f4cdb 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -183,6 +183,8 @@ def error_redirect_helper(env : HTTP::Server::Context) go_to_youtube_embed = translate(locale, "videoinfo_youTube_embed_link") switch_instance = translate(locale, "Switch Invidious Instance") + show_embed_link = "(#{go_to_youtube_embed})" if env.params.query["v"]? + return <<-END_HTML

#{next_steps_text}

END_HTML