mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-15 01:25:08 +00:00
Request Reddit comm when yt disabled during nojs=1
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user