mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-10 03:20:35 +05:30
Request Reddit comm when yt disabled during nojs=1
This commit is contained in:
parent
e0807139eb
commit
f1785170f0
@ -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",
|
||||
|
@ -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
|
||||
|
@ -314,17 +314,24 @@ we're going to need to do it here in order to allow for translations.
|
||||
</noscript>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div id="comments-turned-off-on-video-message" class="h-box v-box">
|
||||
<p><b><%=HTML.escape(translate(locale, "comments_youtube_disabled_text"))%></b></p>
|
||||
<% if !nojs %>
|
||||
<div id="comments-turned-off-on-video-message" class="h-box v-box">
|
||||
<p><b><%=HTML.escape(translate(locale, "comments_youtube_disabled_text"))%></b></p>
|
||||
<p><b><button data-comments="reddit" id="try-reddit-comments-link" class="simulated_a">
|
||||
<%=HTML.escape(translate(locale, "comments_youtube_disabled_try_reddit"))%>
|
||||
</button></b></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<b>
|
||||
<button data-comments="reddit" id="try-reddit-comments-link" class="simulated_a">
|
||||
<%=HTML.escape(translate(locale, "comments_youtube_disabled_try_reddit"))%>
|
||||
</button>
|
||||
</b>
|
||||
</p>
|
||||
</div>
|
||||
<noscript>
|
||||
<% if nojs %>
|
||||
<%= comment_html %>
|
||||
<% else %>
|
||||
<a href="/watch?<%= env.params.query %>&nojs=1">
|
||||
<%= translate(locale, "comments_youtube_disabled_try_reddit_no_js") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</noscript>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user