diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-05-20 14:05:09 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-05-20 14:05:09 +0300 |
commit | 33fc116bac0e1e3a6e3dab39d21116c078d04567 (patch) | |
tree | dd6bdb25ca34175be63f6ad099143e4fede48da2 /src/assets/javascripts/services.js | |
parent | Cleaning code (diff) | |
download | libredirect-33fc116bac0e1e3a6e3dab39d21116c078d04567.zip |
Fixed timestamps being removed for invidious https://github.com/libredirect/browser_extension/issues/922
Diffstat (limited to 'src/assets/javascripts/services.js')
-rw-r--r-- | src/assets/javascripts/services.js | 5 |
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": { |