This commit is contained in:
ManeraKai 2023-09-07 12:20:08 +03:00
parent 94a4ba8b85
commit d2cc8a146b
1 changed files with 8 additions and 1 deletions

View File

@ -155,7 +155,7 @@ function redirect(url, type, initiator, forceRedirection) {
return url.href.replace(/^https?:\/{2}/, "yattee://") return url.href.replace(/^https?:\/{2}/, "yattee://")
} }
case "freetube": { case "freetube": {
return 'freetube://' + url.href return 'freetube://' + url.href
} }
case "poketube": { case "poketube": {
if (url.pathname.startsWith('/channel')) { if (url.pathname.startsWith('/channel')) {
@ -561,6 +561,13 @@ function redirect(url, type, initiator, forceRedirection) {
} }
return `${randomInstance}${url.pathname}${url.search}` 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: { default: {
return `${randomInstance}${url.pathname}${url.search}` return `${randomInstance}${url.pathname}${url.search}`
} }