Skip to content

Instantly share code, notes, and snippets.

@danj2k
Created November 29, 2024 19:38
Show Gist options
  • Save danj2k/a938cc48a6c5609e6bd8a890d7b74564 to your computer and use it in GitHub Desktop.
Save danj2k/a938cc48a6c5609e6bd8a890d7b74564 to your computer and use it in GitHub Desktop.
Bluesky sharer bookmarklet
javascript:(function(){f='https://bsky.app/intent/compose?text=%27+encodeURIComponent(document.title)+%27%20%27+encodeURIComponent(window.location.href);a=function(){if(!window.open(f,%27sharer%27,%27toolbar=0,status=0,resizable=0,width=626,height=436%27))location.href=f};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()
@danj2k
Copy link
Author

danj2k commented Nov 29, 2024

You might be thinking "what do I do with this thing"?. Here's some instructions:

  1. Use your browser's bookmark function to bookmark any old site (even this one) but call the bookmark "Share on Bluesky" and put it on your bookmarks bar for easy access.
  2. Edit the new bookmark, get rid of the URL you bookmarked and copy and paste in the text from the gist above (make sure you use the "raw" version, you don't want any line numbers or scroll bars getting in the way) and save it.
  3. When you're on a webpage you want to share, hit "Share on Bluesky" and it'll open a little new Compose window with the link title and URL pre-filled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment