diff --git a/locales/en-US.json b/locales/en-US.json index a7f7f592..0a26db78 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -216,6 +216,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 3d935f0a..326be1e7 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 fdff8b8e..3e20061d 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 %>