fix: update Twitter profile regex to match new domain x.com

This commit is contained in:
n4ze3m 2025-02-09 12:41:48 +05:30
parent bd0c9bc825
commit 023d3c2fb2

View File

@ -11,7 +11,7 @@ export const isTwitterTimeline = (url: string) => {
}
export const isTwitterProfile = (url: string) => {
const PROFILE_REGEX = /twitter\.com\/[a-zA-Z0-9_]+/g
const PROFILE_REGEX = /x\.com\/[a-zA-Z0-9_]+/g
const X_REGEX = /x\.com\/[a-zA-Z0-9_]+/g
return PROFILE_REGEX.test(url) || X_REGEX.test(url)
}