From 07871281c38a32537968b5749ed0b9e3556139ef Mon Sep 17 00:00:00 2001 From: Adam P Date: Mon, 20 Feb 2023 13:46:48 +0100 Subject: [PATCH 1/3] Preserve URL hash on wikiless redirection --- src/assets/javascripts/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index ecbf572..d998a25 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -475,7 +475,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 From 260fea6fca7dc4a1e3bacec7fc8448d251046b96 Mon Sep 17 00:00:00 2001 From: Jacob Parnell Date: Sat, 25 Feb 2023 02:45:55 -0600 Subject: [PATCH 2/3] Fix YouTube livestream chat being broken on embed-only mode --- src/assets/javascripts/services.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index d998a25..0846ebe 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) { From 31dfbb457f4186106cc1731b5ceb56e9b9d84089 Mon Sep 17 00:00:00 2001 From: Jacob Parnell Date: Sat, 25 Feb 2023 15:32:42 -0600 Subject: [PATCH 3/3] Fix YouTube live chat replays --- src/assets/javascripts/services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 0846ebe..88d0451 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -159,13 +159,13 @@ function redirect(url, type, initiator, forceRedirection) { case "piped": case "pipedMaterial": case "cloudtube": { - if (url.pathname == "/live_chat") { + if (url.pathname.startsWith("/live_chat")) { return null; } return `${randomInstance}${url.pathname}${url.search}`; } case "poketube": { - if (url.pathname == "/live_chat") { + if (url.pathname.startsWith("/live_chat")) { return null; } if (url.pathname.startsWith('/channel')) {