diff --git a/locales/en-US.json b/locales/en-US.json index aa64c452..8183fcb3 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -222,6 +222,7 @@ "comments_youtube_disabled_text": "Youtube comments are disabled on this video", "comments_youtube_disabled_try_reddit": "Try reddit comments?", "comments_invidious_disabled_text": "Comments are hidden as per user preferences", + "comments_youtube_disabled_try_reddit_no_js": "Hi! Looks like you have JavaScript turned off. Although the uploader has disabled YouTube comments you can still click here to try and view Reddit comments, keep in mind they may take a bit longer to load.", "Incorrect password": "Incorrect password", "Wrong answer": "Wrong answer", "Erroneous CAPTCHA": "Erroneous CAPTCHA", diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index aabe8dfc..e60a2d18 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -80,7 +80,8 @@ module Invidious::Routes::Watch if nojs if preferences - source = preferences.comments[0] + source = video.comments? ? preferences.comments[0] : "reddit" + if source.empty? source = preferences.comments[1] end diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 78b2af02..8f788301 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -314,17 +314,24 @@ we're going to need to do it here in order to allow for translations. <% end %> <% else %> -
-

<%=HTML.escape(translate(locale, "comments_youtube_disabled_text"))%>

+ <% if !nojs %> +
+

<%=HTML.escape(translate(locale, "comments_youtube_disabled_text"))%>

+

+
+ <% end %> -

- - - -

-
+ <% end %> <% end %>