mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Request Reddit comm when yt disabled during nojs=1
This commit is contained in:
parent
41f82f189b
commit
9311724e69
@ -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",
|
||||
|
@ -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