Merge pull request #639 from jake-penguins/master

Fix YouTube livestream chat breaking on embed only mode
This commit is contained in:
ManeraKai 2023-02-26 09:34:26 +00:00 committed by GitHub
commit 81b3195444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -155,7 +155,19 @@ function redirect(url, type, initiator, forceRedirection) {
case "freetube": {
return `freetube://https://youtu.be${url.pathname}${url.search}`.replace(/watch\?v=/, "")
}
case "invidious":
case "piped":
case "pipedMaterial":
case "cloudtube": {
if (url.pathname.startsWith("/live_chat")) {
return null;
}
return `${randomInstance}${url.pathname}${url.search}`;
}
case "poketube": {
if (url.pathname.startsWith("/live_chat")) {
return null;
}
if (url.pathname.startsWith('/channel')) {
const reg = /\/channel\/(.*)\/?$/.exec(url.pathname)
if (reg) {