Created
March 21, 2026 18:35
-
-
Save krc/3c29b43726cfdedddc03d17da24b98ba to your computer and use it in GitHub Desktop.
Bookmarklet to copy 'fxtwitter' link to clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: sharedPage=location.href; | |
| if(sharedPage.includes('x.com')){fixSharedPage=sharedPage.replace(/x.com/, "fixupx.com");} | |
| else if(sharedPage.includes('bsky.app')){fixSharedPage=sharedPage.replace(/bsky.app/, "fxbsky.app");} | |
| else if(sharedPage.includes('twitter.com')){fixSharedPage=sharedPage.replace(/twitter.com/, "fxtwitter.com");} | |
| else {fixSharedPage=sharedPage;} | |
| navigator.clipboard.writeText(fixSharedPage);null; |
Author
Thank you for making this, just leaving this here for anyone else
I named mine "Fix X/BSKY Links"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bookmarklet to create FxEmbed aka fixupx/fxtwitter/fxbsky link of current page and put it in clipboard.
Copy whole snippet and paste it into "URL" field of new bookmark, and name it something that makes sense to you.
Putting it on the bookmark toolbar, and setting the toolbar to always display is maybe the easiest way to use, YMMV.
Pretty easy to see how you can change it to use fxembed subdomains, replace x with twitter, etc.
https://github.com/FxEmbed/FxEmbed for more info on how it works.
This bookmarklet is not official however, don't ask them for help with the bookmarklet specifically.
I make no promises about this being a good way to write this functionality, all I know is that is works ok for me.