Update index.ts

This commit is contained in:
OTKUSteyler 2025-12-27 01:50:29 +01:00 • committed by GitHub
parent 414cf25ae8
commit a56b432fba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,19 +42,19 @@ function transformLinks(content: string, config: FixEmbedSettings): string {
if (config.instagram) {
result = result.replace(
/https?:\/\/(?:www\.)?instagram\.com(\/[^\s]+)/gi,
"https://uuinstagram.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