Skip to content

Commit

Permalink
Fixed timestamps being removed for invidious #922
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed May 20, 2024
1 parent 9d75089 commit 33fc116
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 33fc116

Please sign in to comment.