mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
processing url: alt domains for services and fixvx support
This commit is contained in:
parent
5928b21fee
commit
aaa61cfee9
2 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
},
|
},
|
||||||
"twitter": {
|
"twitter": {
|
||||||
"alias": "twitter videos & voice",
|
"alias": "twitter videos & voice",
|
||||||
|
"altDomains": ["x.com", "vxtwitter.com", "fixvx.com"],
|
||||||
"patterns": [":user/status/:id", ":user/status/:id/video/:v"],
|
"patterns": [":user/status/:id", ":user/status/:id/video/:v"],
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,8 +27,9 @@ export function aliasURL(url) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "vxtwitter":
|
case "vxtwitter":
|
||||||
|
case "fixvx":
|
||||||
case "x":
|
case "x":
|
||||||
if (['x.com', 'vxtwitter.com'].includes(url.hostname)) {
|
if (services.twitter.altDomains.includes(url.hostname)) {
|
||||||
url.hostname = 'twitter.com'
|
url.hostname = 'twitter.com'
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue