KevinMehall »

Del.icio.us Hack: Share all items

Update: Delicious 2.0 breaks this script, but has a "Bulk Edit" feature that mitigates this issue.

The popular bookmarking site, del.icio.us, doesn't give users the option to share all links after an import. The FAQ contains the following, completely unhelpful, entry:

We don't have a "share all" button right now for a few reasons: to make sure you know exactly what you're sharing, to encourage you to edit your imported links, and to prevent abuse.

This frustrated me — after importing my items, it would be tedious to go through each bookmark and share them all. So, as any good programmer would do, I took their discouraging FAQ entry as a challenge.

The result: a few lines of Javascript that trick the del.icio.us code into thinking that you have gone through each item, tediously clicking "share", "yes". Just drag the following button to your bookmarks bar (You can delete it after you're done). Then, go to your del.icio.us page, and click the bookmark to share all the items on the page. You will still have to click through each page and run the bookmarklet, but it's a significant improvement.

Del.icio.us - Share all items on this page

Source for the above bookmarklet:

l=document.getElementsByTagName('a');
num=0;
fn=onclicks['shareYes']; // del.icio.us callback for clicking "yes" to confirm sharing an item
for (i=0; i<l.length; i++){
    c=l[i].getAttribute('class');
    if (c && c.indexOf('share')!=-1){
        fn.call(l[i], null);
        num++;
    }
}
alert(num+' items shared!');
Like this post? Share/Save/Bookmark or Subscribe
blog comments powered by Disqus