Update index.ts
This commit is contained in:
parent
a42fb7ce36
commit
2c0c24cb86
1 changed files with 4 additions and 4 deletions
|
|
@ -42,26 +42,26 @@ function transformLinks(content: string, config: FixEmbedSettings): string {
|
|||
if (config.instagram) {
|
||||
result = result.replace(
|
||||
/https?:\/\/(?:www\.)?instagram\.com(\/[^\s]+)/gi,
|
||||
"https://oginstagram.com$1",
|
||||
"https://kkinstagram.com$1",
|
||||
);
|
||||
}
|
||||
// TikTok: Replace domain, keep path
|
||||
if (config.tiktok) {
|
||||
result = result.replace(
|
||||
/https?:\/\/(?:www\.)?tiktok\.com(\/[^\s]+)/gi,
|
||||
"https://tnktok.com$1",
|
||||
"https://tiktokez.com$1",
|
||||
);
|
||||
// TikTok short links (vm.tiktok.com)
|
||||
result = result.replace(
|
||||
/https?:\/\/vm\.tiktok\.com\/([A-Za-z0-9]+)\/?/gi,
|
||||
"https://vm.tnktok.com/$1",
|
||||
"https://vm.tiktokez.com/$1",
|
||||
);
|
||||
}
|
||||
// Reddit: Replace domain, keep path
|
||||
if (config.reddit) {
|
||||
result = result.replace(
|
||||
/https?:\/\/(?:www\.)?reddit\.com(\/[^\s]+)/gi,
|
||||
"https://vxreddit.com$1",
|
||||
"https://rxddit.com$1",
|
||||
);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue