Merge pull request #896 from hamzakat/patch-1

Disable redirection when a link in the YouTube description section is entered
This commit is contained in:
ManeraKai 2024-03-02 20:13:12 +00:00 committed by GitHub
commit bf64922d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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": {