Only use /redirect when automatically redirecting

This commit is contained in:
syeopite
2021-10-02 11:51:15 -07:00
parent 2b81a82620
commit 66e7285108
8 changed files with 56 additions and 33 deletions

View File

@@ -41,9 +41,16 @@
<%= translate(locale, "View playlist on YouTube") %>
</a>
<span> | </span>
<a href="/redirect?referer=<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %>
</a>
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %>
</a>
<% else %>
<a href="https://redirect.invidious.io/<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %>
</a>
<% end %>
</div>
<% end %>
</div>