[Greasemonkey] Frames, Iframes and Divs

greasemonkey.5.markl at spamgourmet.com greasemonkey.5.markl at spamgourmet.com
Wed Mar 15 15:41:53 EST 2006


I am writing a GM script to modify something in Gmail. They have a
rather complicated setup for getting to the email body and it looks
something like this;
Frameset
     --- Frame (name=main)
        --- Iframe (id=frameid)
          --- DIV (id=divid)
            --- Text to modify

I am trying to grab, and modify the text and elements contained inside
the DIV tag. Unfortunately I cannot seem to get "past" the Frame. I
can find it but it doesn't seem to allow me to go "below" it even
though I can see the entire setup using the DOM inspector. I have
tried all sorts of convoluted methods and none of them yield anything
other than "undefined" or "null" if I try to access any properties or
methods for the Frame.

Most of the Javascript help I have seen insists on directly naming the
frame and going from there, but this doesn't seem to work with GM.



More information about the Greasemonkey mailing list