The Composer bookmarklet

Update: Now there are multiple bookmarklets here.

By popular request, Composer has a bookmarklet. Heavily inspired by the WordPress “Press This” feature, it uses the same javascript. You’ll find it on the compose screen under the Submit button.

It works in the usual way. Add it to your bookmarks then click it on any page. If you select some text on the page before you click it, that text will also be copied into the compose screen for you.

Tech

With this change, the compose screen supports 4 new url arguments: body, s = text selection, t = page title, and u = page url, on the new target url http://composer.io/posts/add/b.

The bookmarklet runs its javascript magic and constructs a url that looks like this (all values are url encoded):
http://composer.io/posts/add/b?s=foo&t=bar&u=http://foo.bar/

The body argument was added so you can roll your own bookmarklet and combine whatever javascript variables you want in your own order. The body argument is used first, then the others are combined in the usual way and appended.

For example, this url will load a compose screen like:

I'm the awesome body
This is the text I selected
Title of Awesome http://awesome.tld/

If you do roll your own, please let us know in the comments below. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *