Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save philgruneich/5864545 to your computer and use it in GitHub Desktop.
Save philgruneich/5864545 to your computer and use it in GitHub Desktop.
I was looking for a solution for the absence of window.getSelection in the iPhone Safari. Decided to use the clipboard, integrating it with Drafts with more data to create a blog post at Byword, formatted for a Kirby post. Oh, we also create a Evernote note in the way (:
1. Add this bookmarklet to Safari:
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'%5Cn')+encodeURIComponent(location.href)+'&action=Kirbylity'
2. Add an Evernote or Dropbox action, I'm using an Evernote action called Blogquotes.
3. Add this action to Drafts, named Kirbylity:
drafts://x-callback-url/create?text=[[draft]]&action=Blogquotes&afterSuccess=Delete&x-success={{byword://new?text=Title:%20[[title]]%0d----%0dLink:%20[[body]]%0d----%0dExcerpt:%20%3e[[clipboard]]%0d----%0dText:%20%3e[[clipboard]]}}
4. Copy some text on Safari, activate the bookmarklet, you'll be taken to Drafts and everything else is automatic.
5. Skip the Evernote action using this action only:
byword://new?text=Title:%20[[title]]%0d----%0dLink:%20[[body]]%0d----%0dExcerpt:%20%3e[[clipboard]]%0d----%0dText:%20%3e[[clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment