As I mentioned, I'm falling in love with the Drafts app on iPad/iPhone. One of the things I'm using its 'Actions' for is quickly dumping URLs into a single text file.

It occurred to me that an app that plays so nicely with URL schemes (ie. sending things to other apps via their URL schemes) would probably have a scheme of its own for pulling things in. A little googling later and I found that you can; like this bookmarklet


And a similar one from here


So, I figured a basic "send the URL of the current page to drafts" bookmarklet might look like;


(Note - in Drafts, I have allowed URLs to trigger actions, but disabled the 'key' parameter. I should probably fix this at some point, but for now I'm going with "make it work" over "make it secure".)

And… yay - it works! From clicking a bookmarklet, I now have a Drafts document with the page title on one line and the URL on the next. Awesome...

What else can I do? Well, I have an action in Drafts called "LinksCollection" which sends things to a "links collection" Dropbox document, which I thought would be handy to store all of the links I obsessively collect (but rarely organise). That would be very handy to be able to trigger straight from Safari. Again, modifying the bookmarklets I found above a little, I get to;


Success! (Again!) But this time, I get a "run this in Drafts?" pop up box. I didn't notice that before… Which is fine, but it might be nice to get rid of this.

But first, I want to play with this;


From my rudimentary Javascript, it looks like I can grab a selected piece of text from the web page (.getSelection) and send that chunk of text to Drafts as well.

Dropping the Action part for now (so that I can only break one thing at a time...)


And… it doesn't work. Or rather, it just does what the first version did – no extra text selection goodness.

Still, thats good enough for me for today - I can now do the clever things that I can do in Drafts straight from a Safari bookmarklet.