Twitter vs x - url treatment by the forum
-
I was noticing all my Twitter links were showing up as naked urls but George’s were still displaying correctly. Looking into it, I see that he was still using Twitter.com in his urls whereas mine were x.com.
Just now I edited an x link and replaced x with Twitter and it displayed.
I guess this is both a PSA and a question to the tech gurus if that’s something that can be fixed.
George - do you go back and edit your links or are you somehow still able to copy Twitter links directly from the app or web version?
-
My bet is he’s copying links from the webpage utilizing the Twitter URL
-
I was noticing all my Twitter links were showing up as naked urls but George’s were still displaying correctly. Looking into it, I see that he was still using Twitter.com in his urls whereas mine were x.com.
Just now I edited an x link and replaced x with Twitter and it displayed.
I guess this is both a PSA and a question to the tech gurus if that’s something that can be fixed.
George - do you go back and edit your links or are you somehow still able to copy Twitter links directly from the app or web version?
@jon-nyc said in Twitter vs x - url treatment by the forum:
George - do you go back and edit your links or are you somehow still able to copy Twitter links directly from the app or web version?
I use the web version of "X" with safari. I just "copy" link and paste it into the forum:

https://t witter.com/TomBevanRCP/status/1700114280501129301?s=20
The URL still shows as twitter.

-
I'm sure you are all dying to know how I did this: I cloned the repository of the plugin and changed the regular expression that searches for twitter URLs to also include x.com URLs.
Specifically, I replaced this line of code
const regularUrl = /<a href="(?:https?:\/\/)?(?:(?:(?:mobile|www)\.)?twitter\.com)\/([^\/"\s]*)\/statuse?s?\/([^\/"\s]*)(\/photo\/\d|)".*?>.+?<\/a>/gby this
const regularUrl = /<a href="(?:https?:\/\/)?(?:(?:(?:mobile|www)\.)?(twitter|x)\.com)\/([^\/"\s]*)\/statuse?s?\/([^\/"\s]*)(\/photo\/\d|)".*?>.+?<\/a>/gIt was important for me to let you know about this.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login