Support for /c/ youtube urls

This commit is contained in:
shinigami-eyes 2019-04-08 16:26:09 +02:00
parent 5f82d608b4
commit b5fb98b4eb
1 changed files with 2 additions and 2 deletions

View File

@ -455,9 +455,9 @@ function getIdentifierInternal(urlstr) {
return 'twitter.com' + takeFirstPathComponents(url.pathname, 1);
}
if (isHostedOn(host, 'youtube.com')) {
var pathname = url.pathname;
var pathname = url.pathname.replace('/c/', '/user/');
if (!pathname.startsWith('/user/') && !pathname.startsWith('/channel/')) return null;
return 'youtube.com' + takeFirstPathComponents(url.pathname, 2);
return 'youtube.com' + takeFirstPathComponents(pathname, 2);
}
if (isHostedOn(host, 'disqus.com') && url.pathname.startsWith('/by/')) {
return 'disqus.com' + takeFirstPathComponents(url.pathname, 2);