aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/assets/javascripts/services.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 6dd73561..cfaba48e 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -496,6 +496,13 @@ function redirect(url, type, initiator, forceRedirection) {
}
return `${randomInstance}${url.pathname}${url.search}`
}
+ case "invidiousMusic": {
+ if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
+ const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
+ return `${randomInstance}/watch?v=${watch}`
+ }
+ return `${randomInstance}${url.pathname}${url.search}`
+ }
case "libremdb": {
if (url.pathname.startsWith("/Name")) {
for (const [key, value] of url.searchParams.entries()) {