forked from Mastodon/mastoradio-la-radio-di-mastodon
add support to mobile youtube subdomain
This commit is contained in:
parent
5b8e74688d
commit
66c57e566e
|
@ -123,7 +123,7 @@ function mkData(status)
|
|||
for (const urlAsString of urls) {
|
||||
const url = new URL(urlAsString)
|
||||
|
||||
if (['youtube.com', 'music.youtube.com'].includes(url.hostname) && url.searchParams.has('v')) {
|
||||
if (['youtube.com', 'm.youtube.com', 'music.youtube.com'].includes(url.hostname) && url.searchParams.has('v')) {
|
||||
return { url: urlAsString, id: url.searchParams.get('v') }
|
||||
} else if (url.hostname === 'youtu.be') {
|
||||
return { url: urlAsString, id: url.pathname.substring(1) }
|
||||
|
|
Loading…
Reference in New Issue