Fix YouTube livestream chat being broken on embed-only mode
This commit is contained in:
parent
b74a97b47e
commit
260fea6fca
@ -155,7 +155,19 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||||||
case "freetube": {
|
case "freetube": {
|
||||||
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
|
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
|
||||||
}
|
}
|
||||||
|
case "invidious":
|
||||||
|
case "piped":
|
||||||
|
case "pipedMaterial":
|
||||||
|
case "cloudtube": {
|
||||||
|
if (url.pathname == "/live_chat") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return `${randomInstance}${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
case "poketube": {
|
case "poketube": {
|
||||||
|
if (url.pathname == "/live_chat") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (url.pathname.startsWith('/channel')) {
|
if (url.pathname.startsWith('/channel')) {
|
||||||
const reg = /\/channel\/(.*)\/?$/.exec(url.pathname)
|
const reg = /\/channel\/(.*)\/?$/.exec(url.pathname)
|
||||||
if (reg) {
|
if (reg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user