diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-03-02 20:13:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 20:13:12 +0000 |
commit | bf64922d2c1160198e5eb0e4debf4440afab807b (patch) | |
tree | b73a0d54cc1ef5b6389af663dba4e0233992b622 /src/assets/javascripts | |
parent | Added ViewTube https://github.com/libredirect/browser_extension/issues/115 (diff) | |
parent | Disable redirection when a link in the YouTube description section is entered (diff) | |
download | libredirect-bf64922d2c1160198e5eb0e4debf4440afab807b.zip |
Merge pull request #896 from hamzakat/patch-1
Disable redirection when a link in the YouTube description section is entered
Diffstat (limited to 'src/assets/javascripts')
-rw-r--r-- | src/assets/javascripts/services.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 084214ce..9eefbe20 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": { |