From ae2046185cac5049a219c863c59531f9c4705c4d Mon Sep 17 00:00:00 2001 From: Kira Date: Thu, 26 Mar 2026 19:58:39 -0400 Subject: [PATCH] add x.com to loop of links --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5ba4105..ea4b33e 100644 --- a/index.js +++ b/index.js @@ -53,11 +53,10 @@ function swapify(url) { const girlcockRegex = /https?:\/\/girlcockx\.com\/(.*?)\/status\/(\d+)/; const fxtwitterRegex = /https?:\/\/fxtwitter\.com\/(.*?)\/status\/(\d+)/; const fixupxRegex = /https?:\/\/fixupx\.com\/(.*?)\/status\/(\d+)/; + const twitterRegex = /https?:\/\/x\.com\/(.*?)\/status\/(\d+)/; if (url.match(girlcockRegex)) return convertURL(url, girlcockRegex, "fxtwitter.com"); if (url.match(fxtwitterRegex)) return convertURL(url, fxtwitterRegex, "fixupx.com"); - if (url.match(fixupxRegex)) return convertURL(url, fixupxRegex, "girlcockx.com"); - // if we got this far, somethings not right but we'll try twitter before giving up - const twitterRegex = /https?:\/\/x\.com\/(.*?)\/status\/(\d+)/; + if (url.match(fixupxRegex)) return convertURL(url, fixupxRegex, "x.com"); if (url.match(twitterRegex)) return convertURL(url, twitterRegex, "girlcockx.com"); return url; // give up, we'll just return the original URL }