Skip to content

Instantly share code, notes, and snippets.

@krc
Created March 21, 2026 18:35
Show Gist options
  • Select an option

  • Save krc/3c29b43726cfdedddc03d17da24b98ba to your computer and use it in GitHub Desktop.

Select an option

Save krc/3c29b43726cfdedddc03d17da24b98ba to your computer and use it in GitHub Desktop.
Bookmarklet to copy 'fxtwitter' link to clipboard
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;
@krc
Copy link
Copy Markdown
Author

krc commented Mar 21, 2026

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.

@Celesian
Copy link
Copy Markdown

Celesian commented Apr 8, 2026

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