add support to mobile youtube subdomain

This commit is contained in:
wryk 2020-01-27 17:05:47 +01:00
parent 5b8e74688d
commit 66c57e566e
1 changed files with 1 additions and 1 deletions

View File

@ -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) }