From a7665994f05bf7f4cd5ddc215dc73a5d71008b0e Mon Sep 17 00:00:00 2001 From: Hamza <74574779+hamzakat@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:56:35 +0300 Subject: [PATCH] Disable redirection when a link in the YouTube description section is entered --- src/assets/javascripts/services.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 084214c..9eefbe2 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -496,6 +496,9 @@ function redirect(url, type, initiator, forceRedirection, incognito) { const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1) return `${randomInstance}/watch?v=${watch}` } + if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?")) { + return url.href + } return `${randomInstance}${url.pathname}${url.search}` } case "invidiousMusic": {