(see Update below!)
For a while, I have assigned a keyword to the del.icio.us bookmarklet. I use Sogudi in Safari for this, but the same feature exists in pretty much any other browser. With the default bookmarklet, I had assigned the keyword “dl” to it, so when viewing a web page, I can just press Command-L, type “dl”, press Enter, enter tags, press “Save”, and it saves the bookmark and takes me back to the page.
This trick by Fraser Speirs inspired me to try and improve this technique. I have now slightly modified the bookmarklet so I can enter the tags I want directly after the keyword. This is the content of the bookmark (make sure it’s all in a single line and without spaces):
The “@@@” is the special string that tells Sogudi to insert there the text typed after the keyword (for Firefox and Mozilla, use “%s” – I’m not sure for Opera). After this is saved, you can type “dl tag1 tag2 tag3” and the tags field will be pre-filled, you can just press the “save” button.
For automatically posting the URL, without going through the form, you can use this bookmark:
Don’t forget to set your username and password in there. This has the disadvantage of showing you the XML result page instead of sending you back to the page.
Update: Using this improved bookmarklet as a base, I have a new one: if you provide tags, it will automatically add the URL, but if you don’t, it will take you to the input form. It still will use the selected text, if any, as the extended description (unfortunately this does not work in Safari, as it unselects the text when you move to the location bar – bummer). Here are the bookmarklets:
- For Sogudi (right-click, select “Copy link” and paste into the Sogudi configuration window).
- For Firefox or Mozilla (drag into your bookmarks).
In any case, you have to edit the bookmark and replace the string CHANGEME with your del.icio.us username. Here is the code (for the Firefox version), in case you want to cut and paste (make sure you put it all in a single line):
(window.getSelection ? window.getSelection() : document.getSelection ?
document.getSelection() : document.selection.createRange().text);
escape(p)+ '&extended=' + escape(e):'http://del.icio.us/'+u+
Thanks to John Resig for the improved code!