The code is here (and it's MPL licensed so you can do whatever you want with it :-) !):
# Version 0.3 - http://gist.github.com/345516 - based on code from Bryan Clark and Mark Banner
# Version 0.2 - http://userscripts.org/jetpacks/391/source - has a drop down and inserts a link, progress, thanks Bryan!
# Version 0.1 - http://gist.github.com/gists/291506