api/service-config: add new domains for vk

This commit is contained in:
wukko 2024-11-26 18:21:44 +06:00
parent 5be8789576
commit d4bcb1ba61
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 9 additions and 1 deletions

View file

@ -159,6 +159,7 @@ export const services = {
"clips:duplicate?z=clip:userId_:videoId"
],
subdomains: ["m"],
altDomains: ["vkvideo.ru", "vk.ru"],
},
youtube: {
patterns: [

View file

@ -42,7 +42,7 @@ function aliasURL(url) {
case "fixvx":
case "x":
if (services.twitter.altDomains.includes(url.hostname)) {
url.hostname = 'twitter.com'
url.hostname = 'twitter.com';
}
break;
@ -85,6 +85,13 @@ function aliasURL(url) {
url.hostname = 'instagram.com';
}
break;
case "vk":
case "vkvideo":
if (services.vk.altDomains.includes(url.hostname)) {
url.hostname = 'vk.com';
}
break;
}
return url