bilibili: add support for bilibili.tv links

closes #319
This commit is contained in:
dumbmoron
2024-02-15 18:11:18 +00:00
parent 6e1eddad82
commit 0852ade1be
5 changed files with 104 additions and 23 deletions

View File

@@ -49,6 +49,11 @@ export function aliasURL(url) {
}
break;
case "bilibili":
if (host.tld === 'tv') {
url = new URL(`https://bilibili.com/_tv${url.pathname}`);
}
break;
case "b23":
if (url.hostname === 'b23.tv' && parts.length === 2) {
url = new URL(`https://bilibili.com/_shortLink/${parts[1]}`)