[Greasemonkey] Drop down box

Tod Beardsley todb at planb-security.net
Fri Sep 22 17:03:13 EDT 2006


On 9/22/06, Matthew Weymar <matthew.weymar at gmail.com> wrote:

> (If you'd like to show me how to simplify this, I'd be more than happy to
> learn!)

So, since I took this as a challenge, I've updated it to a one liner.

Install here: http://www.planb-security.net/userscripts/delicious-default-bookmarks.user.js

But it's just:
  document.forms[0].elements[2].selectedIndex = 0;

You don't know exactly what form you're modifying, or to what value,
but it's fast and easy to read. Should be fine since I don't expect
the form to move around too much in the next few months.

-- 
planb-security.net | ICQ: 335082155 | Note: Due to Google's privacy
policy <http://tinyurl.com/5xbtl> and the United States' policy on
electronic surveillance <http://tinyurl.com/muuyl>, please do not
IM/e-mail me anything you wish to remain secret or private.


More information about the Greasemonkey mailing list