diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-02-28 18:00:24 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-02-28 18:00:24 +0300 |
commit | 20b5093989d6d6c1af75c8aef125f1b234bfc3c1 (patch) | |
tree | 2127ff660894ef4b883809881bf7cdc1fd26bc10 /src/assets/javascripts/services.js | |
parent | Updated version 2.5.2 => 2.5.3 (diff) | |
parent | Merge pull request #639 from jake-penguins/master (diff) | |
download | libredirect-20b5093989d6d6c1af75c8aef125f1b234bfc3c1.zip |
Merge branch 'master' of https://github.com/libredirect/libredirect
Diffstat (limited to 'src/assets/javascripts/services.js')
-rw-r--r-- | src/assets/javascripts/services.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index eeb69a72..eb2a665e 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -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) { @@ -475,7 +487,7 @@ function redirect(url, type, initiator, forceRedirection) { // 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] - return link + return link + url.hash } case "proxiTok": { if (url.pathname.startsWith('/email')) return |