diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 573318e..e096ef9 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -155,7 +155,7 @@ function redirect(url, type, initiator, forceRedirection) { return url.href.replace(/^https?:\/{2}/, "yattee://") } case "freetube": { - return 'freetube://' + url.href + return 'freetube://' + url.href } case "poketube": { if (url.pathname.startsWith('/channel')) { @@ -561,6 +561,13 @@ function redirect(url, type, initiator, forceRedirection) { } return `${randomInstance}${url.pathname}${url.search}` } + case "invidious": { + 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}` + } default: { return `${randomInstance}${url.pathname}${url.search}` }