Extended del.icio.us bookmarklet

| 1 Comment

Dan Phiffer came up with a really neat Google/del.icio.us greasemonkey userscript idea:

Use case: I search for “tuna sandwich” and Google brings up http://www.starkist.com/recipes/sandwiches/classictuna.html among a host of other tuna-related links. A Greasemonkey script pays attention to which link I click on and upon the click event, bookmarks this page with the tags “tuna” and “sandwich”.

People agreed that it is neat, but then Lenny Domnitser replied that the same could be easily and more conveniently accomplished with a simple modification of the “Post to del.icio.us” bookmarklet:

javascript:
var t,q=document.referrer.match(/q=([^&]+)/);
if(q){t='&tags='+q[1];}else{t=''}
location.href='http://del.icio.us/YOURDELICIOUS?url='+
encodeURIComponent(location.href)+'&title='+
encodeURIComponent(document.title)+t;

Simply replace YOURDELICIOUS with your del.icio.us account name, and make it one long line, then add it to your Firefox bookmarks.

Works like a charm, thanks, Lenny!

1 Comment

Hehe, that is very nice indeed!

Leave a comment

About this Entry

This page contains a single entry by tobez published on November 10, 2005 10:41 AM.

Fake biblical curse generator was the previous entry in this blog.

Make Yahoo Weather respect metric units is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.