Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Mike Chelen
Doing something for every element with a certain attribute [Dive Into Greasemonkey] #xpath - http://diveintogreasemonkey.org/pattern...
"Let's say, for example, that you wanted to find all the links on a page. You might consider using document.getElementsByTagName('a'), but then you'll still need to check each element to see if it has an href attribute, because the <a> element can also be used for named anchors. Instead, use Firefox's built-in XPath support to find all the <a> elements that have an href attribute." - Mike Chelen from Bookmarklet