mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-02 08:26:22 +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"
|
"clips:duplicate?z=clip:userId_:videoId"
|
||||||
],
|
],
|
||||||
subdomains: ["m"],
|
subdomains: ["m"],
|
||||||
|
altDomains: ["vkvideo.ru", "vk.ru"],
|
||||||
},
|
},
|
||||||
youtube: {
|
youtube: {
|
||||||
patterns: [
|
patterns: [
|
||||||
|
|
|
@ -42,7 +42,7 @@ function aliasURL(url) {
|
||||||
case "fixvx":
|
case "fixvx":
|
||||||
case "x":
|
case "x":
|
||||||
if (services.twitter.altDomains.includes(url.hostname)) {
|
if (services.twitter.altDomains.includes(url.hostname)) {
|
||||||
url.hostname = 'twitter.com'
|
url.hostname = 'twitter.com';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -85,6 +85,13 @@ function aliasURL(url) {
|
||||||
url.hostname = 'instagram.com';
|
url.hostname = 'instagram.com';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "vk":
|
||||||
|
case "vkvideo":
|
||||||
|
if (services.vk.altDomains.includes(url.hostname)) {
|
||||||
|
url.hostname = 'vk.com';
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
|
Loading…
Reference in a new issue