about summary refs log tree commit diff stats
path: root/src/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/javascripts')
-rw-r--r--src/assets/javascripts/services.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index e5a57890..b78cbb99 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -385,11 +385,10 @@ function rewrite(url, frontend, randomInstance) {
 		case "invidious": {
 			if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
 				const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
-				return `${randomInstance}/watch?v=${watch}`
+				return `${randomInstance}/watch?v=${watch}${url.search.replace("?", "&")}`
 			}
-			if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?")) {
+			if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?"))
 				return url.href
-			}
 			return `${randomInstance}${url.pathname}${url.search}`
 		}
 		case "invidiousMusic": {