Added Invidious for YT Music https://github.com/libredirect/browser_extension/issues/830
This commit is contained in:
parent
4e379b0623
commit
9317c75ea2
|
@ -496,6 +496,13 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||
}
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
case "invidiousMusic": {
|
||||
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}${url.pathname}${url.search}`
|
||||
}
|
||||
case "libremdb": {
|
||||
if (url.pathname.startsWith("/Name")) {
|
||||
for (const [key, value] of url.searchParams.entries()) {
|
||||
|
|
|
@ -18,26 +18,6 @@
|
|||
}
|
||||
},
|
||||
"services": {
|
||||
"youtubeMusic": {
|
||||
"frontends": {
|
||||
"hyperpipe": {
|
||||
"name": "Hyperpipe",
|
||||
"instanceList": true,
|
||||
"url": "https://codeberg.org/Hyperpipe/Hyperpipe"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
"^https?:\\/{2}music\\.youtube\\.com\\/"
|
||||
],
|
||||
"name": "YT Music",
|
||||
"options": {
|
||||
"enabled": false,
|
||||
"frontend": "hyperpipe",
|
||||
"unsupportedUrls": "bypass"
|
||||
},
|
||||
"imageType": "png",
|
||||
"url": "https://music.youtube.com"
|
||||
},
|
||||
"youtube": {
|
||||
"frontends": {
|
||||
"invidious": {
|
||||
|
@ -141,6 +121,32 @@
|
|||
"embeddable": true,
|
||||
"url": "https://youtube.com"
|
||||
},
|
||||
"youtubeMusic": {
|
||||
"frontends": {
|
||||
"hyperpipe": {
|
||||
"name": "Hyperpipe",
|
||||
"instanceList": true,
|
||||
"url": "https://codeberg.org/Hyperpipe/Hyperpipe"
|
||||
},
|
||||
"invidiousMusic": {
|
||||
"name": "Invidious",
|
||||
"embeddable": true,
|
||||
"instanceList": true,
|
||||
"url": "https://invidious.io/"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
"^https?:\\/{2}music\\.youtube\\.com\\/"
|
||||
],
|
||||
"name": "YT Music",
|
||||
"options": {
|
||||
"enabled": false,
|
||||
"frontend": "hyperpipe",
|
||||
"unsupportedUrls": "bypass"
|
||||
},
|
||||
"imageType": "png",
|
||||
"url": "https://music.youtube.com"
|
||||
},
|
||||
"twitter": {
|
||||
"frontends": {
|
||||
"nitter": {
|
||||
|
|
Loading…
Reference in New Issue