Temporary fixed invidious redirecting bug https://github.com/libredirect/browser_extension/issues/763
This commit is contained in:
parent
94a4ba8b85
commit
d2cc8a146b
|
@ -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}`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue