This commit is contained in:
ManeraKai 2023-02-28 18:00:24 +03:00
commit 20b5093989
1 changed files with 13 additions and 1 deletions

View File

@ -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.startsWith("/live_chat")) {
return null;
}
return `${randomInstance}${url.pathname}${url.search}`;
}
case "poketube": { case "poketube": {
if (url.pathname.startsWith("/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) {
@ -475,7 +487,7 @@ function redirect(url, type, initiator, forceRedirection) {
// wikiless doesn't have mobile view support yet // wikiless doesn't have mobile view support yet
} }
for (let i = 0; i < GETArguments.length; i++) link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1] for (let i = 0; i < GETArguments.length; i++) link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1]
return link return link + url.hash
} }
case "proxiTok": { case "proxiTok": {
if (url.pathname.startsWith('/email')) return if (url.pathname.startsWith('/email')) return