about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJacob Parnell <jparnell@mailfence.com>2023-02-25 02:45:55 -0600
committerJacob Parnell <jparnell@mailfence.com>2023-02-25 02:45:55 -0600
commit260fea6fca7dc4a1e3bacec7fc8448d251046b96 (patch)
treed11ed7d442d226caaf39fac1e75960258da3f1de
parentMerge pull request #635 from r-flash/patch-1 (diff)
downloadlibredirect-260fea6fca7dc4a1e3bacec7fc8448d251046b96.zip
Fix YouTube livestream chat being broken on embed-only mode
Diffstat (limited to '')
-rw-r--r--src/assets/javascripts/services.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index d998a25b..0846ebeb 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 == "/live_chat") {
+				return null;
+			}
+			return `${randomInstance}${url.pathname}${url.search}`;
+		}
 		case "poketube": {
+			if (url.pathname == "/live_chat") {
+				return null;
+			}
 			if (url.pathname.startsWith('/channel')) {
 				const reg = /\/channel\/(.*)\/?$/.exec(url.pathname)
 				if (reg) {