> Assuming you want to change these, you can select spans with a class of
> "pressure", otherwise you could look for digits followed by "mb" in all
> text content and replace that, as an another option ... nothing GM
> specific here, just plain DOM manipulations. If your selectors get more
> complex jQuery may be helpful, see
> http://wiki.greasespot.net/Third-Party_Libraries#jQuery for details.
I don't understand getting the references by class - I'm not sure how to
handle the return from getElementsByClassName - this doesn't seem to be a
simple array of objects.
I also tried a global search and replace like this as a test:
var searchRE = new RegExp('mb','gi');
var replace = 'xx';
for (var i=0;i<textNodes.snapshotLength;i++) {
var node = textNodes.snapshotItem(i);
node.data = node.data.replace(searchRE, replace);
}
And it did not appear to do anything. One problem I have is I simply don't
know how to output to the error console for debugging.
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.