mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/service-config: add new domains for vk
This commit is contained in:
parent
5be8789576
commit
d4bcb1ba61
2 changed files with 9 additions and 1 deletions
|
@ -159,6 +159,7 @@ export const services = {
|
|||
"clips:duplicate?z=clip:userId_:videoId"
|
||||
],
|
||||
subdomains: ["m"],
|
||||
altDomains: ["vkvideo.ru", "vk.ru"],
|
||||
},
|
||||
youtube: {
|
||||
patterns: [
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue