Added Freetube to YouTube Music https://github.com/libredirect/browser_extension/issues/940
This commit is contained in:
parent
9e6862ab1a
commit
a20082de57
|
@ -396,6 +396,13 @@ function rewrite(url, frontend, randomInstance) {
|
||||||
return url.href
|
return url.href
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
|
case "freetubeMusic": {
|
||||||
|
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
|
||||||
|
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
|
||||||
|
return `freetube://youtube.com/watch?v=${watch}`
|
||||||
|
}
|
||||||
|
return 'freetube://' + url.href
|
||||||
|
}
|
||||||
case "invidiousMusic": {
|
case "invidiousMusic": {
|
||||||
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
|
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
|
||||||
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
|
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
|
||||||
|
|
|
@ -159,6 +159,13 @@
|
||||||
"embeddable": true,
|
"embeddable": true,
|
||||||
"instanceList": true,
|
"instanceList": true,
|
||||||
"url": "https://invidious.io/"
|
"url": "https://invidious.io/"
|
||||||
|
},
|
||||||
|
"freetubeMusic": {
|
||||||
|
"name": "FreeTube",
|
||||||
|
"embeddable": false,
|
||||||
|
"desktopApp": true,
|
||||||
|
"instanceList": false,
|
||||||
|
"url": "https://github.com/FreeTubeApp/FreeTube"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
|
|
Loading…
Reference in New Issue