[Greasemonkey] Grab text string in TD

Dave relaxedguy at gmail.com
Thu Apr 21 19:26:34 EDT 2005


I am figuring out how to remove tables from pages and most of the
sites I want to do this to are pretty stingy with div's ID's, names,
etc.

I am stumped on how to find a <td> cell that contains a particular string.

I am iterating through a list of <td>'s and attempting to use the
match function to find which <td> starts with the word "Special".

I GetElements ByTagName, then for each one:
 if (td1.getAttribute('value').match(/^Special/))
...

I can't figure out the proper syntax for this. I think that 'value' is
incorrect but after rtfm'ing for a while I'm still stumped.

What sites are people using as definitive resources for javascript/DOM
references in regards to GM?

My list so far:
http://kb.mozillazine.org/Parsing_and_serializing_XML
http://www.howtocreate.co.uk
http://www.mozilla.org/docs/dom/samples/


-- 
Dave Evans


More information about the Greasemonkey mailing list