Merge pull request #2444 from syeopite/only-use-redirect-endpoint-when-needed
Only use the /redirect endpoint when automatically redirecting to another instancepull/2621/head
commit
00904ae3f2
@ -0,0 +1,21 @@
|
|||||||
|
<div class="flex-right">
|
||||||
|
<div class="icon-buttons">
|
||||||
|
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch<%=endpoint_params%>">
|
||||||
|
<i class="icon ion-logo-youtube"></i>
|
||||||
|
</a>
|
||||||
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch<%=endpoint_params%>&listen=1">
|
||||||
|
<i class="icon ion-md-headset"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
|
||||||
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=%2Fwatch<%=URI.encode_www_form(endpoint_params)%>">
|
||||||
|
<i class="icon ion-md-jet"></i>
|
||||||
|
</a>
|
||||||
|
<% else %>
|
||||||
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="https://redirect.invidious.io/watch<%=endpoint_params%>">
|
||||||
|
<i class="icon ion-md-jet"></i>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue