From 437bdedb07b438d329d254f9d515803fd8520a9f Mon Sep 17 00:00:00 2001
From: syeopite
Date: Fri, 15 Oct 2021 14:40:59 -0700
Subject: [PATCH] Use env.request.resource for instance switch link
---
src/invidious/views/channel.ecr | 2 +-
src/invidious/views/community.ecr | 2 +-
src/invidious/views/playlist.ecr | 2 +-
src/invidious/views/playlists.ecr | 2 +-
src/invidious/views/watch.ecr | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr
index 66f1ae10..40b553a9 100644
--- a/src/invidious/views/channel.ecr
+++ b/src/invidious/views/channel.ecr
@@ -48,7 +48,7 @@
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
"><%= translate(locale, "Switch Invidious Instance") %>
<% else %>
- "><%= translate(locale, "Switch Invidious Instance") %>
+ <%= translate(locale, "Switch Invidious Instance") %>
<% end %>
<% if !channel.auto_generated %>
diff --git a/src/invidious/views/community.ecr b/src/invidious/views/community.ecr
index 17bc4f89..f0add06b 100644
--- a/src/invidious/views/community.ecr
+++ b/src/invidious/views/community.ecr
@@ -47,7 +47,7 @@
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
"><%= translate(locale, "Switch Invidious Instance") %>
<% else %>
- "><%= translate(locale, "Switch Invidious Instance") %>
+ <%= translate(locale, "Switch Invidious Instance") %>
<% end %>
<% if !channel.auto_generated %>
diff --git a/src/invidious/views/playlist.ecr b/src/invidious/views/playlist.ecr
index 4c23ad98..d0518de7 100644
--- a/src/invidious/views/playlist.ecr
+++ b/src/invidious/views/playlist.ecr
@@ -47,7 +47,7 @@
<%= translate(locale, "Switch Invidious Instance") %>
<% else %>
- ">
+
<%= translate(locale, "Switch Invidious Instance") %>
<% end %>
diff --git a/src/invidious/views/playlists.ecr b/src/invidious/views/playlists.ecr
index 74890f5a..12dba088 100644
--- a/src/invidious/views/playlists.ecr
+++ b/src/invidious/views/playlists.ecr
@@ -50,7 +50,7 @@
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
"><%= translate(locale, "Switch Invidious Instance") %>
<% else %>
- "><%= translate(locale, "Switch Invidious Instance") %>
+ <%= translate(locale, "Switch Invidious Instance") %>
<% end %>
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 928e5645..2f3709dd 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -119,7 +119,7 @@ we're going to need to do it here in order to allow for translations.
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
"><%= translate(locale, "Switch Invidious Instance") %>
<% else %>
- "><%= translate(locale, "Switch Invidious Instance") %>
+ <%= translate(locale, "Switch Invidious Instance") %>
<% end %>