Update index.ts

This commit is contained in:
OTKUSteyler 2026-09-04 20:36:27 +02:00 • committed by GitHub
parent a42fb7ce36
commit 2c0c24cb86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;