add x.com to loop of links
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
This commit is contained in:
5
index.js
5
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user