mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-19 06:39:57 +00:00
url: make youtu.be alias rule more lax
This commit is contained in:
parent
2e1eb1b864
commit
149c16abbb
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ export function aliasURL(url) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "youtu":
|
case "youtu":
|
||||||
if (url.hostname === 'youtu.be' && parts.length === 2) {
|
if (url.hostname === 'youtu.be' && parts.length >= 2) {
|
||||||
/* youtu.be urls can be weird, e.g. https://youtu.be/<id>//asdasd// still works
|
/* youtu.be urls can be weird, e.g. https://youtu.be/<id>//asdasd// still works
|
||||||
** but we only care about the 1st segment of the path */
|
** but we only care about the 1st segment of the path */
|
||||||
url = new URL(`https://youtube.com/watch?v=${
|
url = new URL(`https://youtube.com/watch?v=${
|
||||||
|
|
Loading…
Reference in a new issue