Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Automate Adding Bookmarks to del.icio.us

I use del.icio.us to store all of my infrequently used bookmarks, but I've found that browsing by tag just isn't very efficient for me. I always use a full text search through my bookmarks to find what I'm looking for, so what I'm really looking for is a single-click save solution similar to the star button on the Flock browser.

Greasemonkey comes to the rescue with the del.icio.us autotag user script, but the problem is that you can't edit the bookmarks by clicking on the del.icio.us tag button, because that script always immediately submits the form, and also duplicates the tags.

I've created an upgrade to the script that fixes those problems. Just like the first script, it will automatically add the popular and recommended tags:

image

Here's the details:

  • Automatically enters in popular or recommended tags, submits the form and closes the pop-up window.
  • If the bookmark has already been saved, it will leave the edit window as is.
  • Doesn't duplicate the tags if you use the tag button more than once.

And here's the source code, in case you are interested:

var poptags = unsafeWindow['tagPop'];
if (poptags) { // test to make sure we're on the post page
  if (poptags == "") {
    var rectags = unsafeWindow['tagRec'];
    var finaltags = rectags.toString();
  } else {
    var finaltags = poptags.toString();
  }
  if(document.getElementById('tags').value.length > 4){
    editmode = 1;
  }else{
    editmode = 0;
    var myarray = finaltags.split(",");
      for (var tag in myarray) {
            if (document.getElementById('tags').value.search(/myarray[tag]/) == -1) {
            document.getElementById('tags').value += myarray[tag] + " ";
        }
      }
  }
  if(finaltags.length > 4 && editmode == 0){
      document.getElementById('delForm').submit();
  }
}

I simply couldn't live without this script, but I wouldn't recommend using it if you like to browse by tag.

Install del.icio.us automater Greasemonkey script

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 08/20/07 and tagged with: Firefox, Firefox & Internet

Comments (3)

  1. engtech @ IDT

    You should submit these scripts over at http://userscripts.org as well.

    That's usually where I go to find Greasemonkey hacks. :)

    You can still host on your own website.

  2. The Geek

    Yeah, I was meaning to upload it there too… just hadn't gotten around to it.

  3. Alejandro

    I didn't get how to install (automaticaly) this app… is its install for advanced users only?..

    I hope you can give me an answer. Thanks


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.