I'm having trouble adding an iframe to the top of the page and was
wondering if there was an easy way to debug this. Here is my code:

var firstChild = document.body.firstChild;

var frame = document.createElement("iframe");
frame.setAttribute('id', 'hello');
frame.setAttribute("src", "hello.html");
frame.setAttribute('width','100%');
frame.style.height = "0px";
frame.style.border = "none";
frame.style.position = "fixed";
frame.style.top = "0px";
frame.style.left = "0px";
frame.style.marginBottom = "0px";
frame.style.marginLeft = "0px";
frame.style.zIndex = "1000000";

document.body.style.position = "relative";
document.body.style.top = "0px";
document.body.insertBefore(frame, firstChild);

I was able to insert a text node fine and when I inspect the page I
can see the iframe, it is just not rendered in the page. Any
assistance would be greatly appreciated! Thanks.

On Jan 11, 6:06 pm, Mike Mitchell <mjmit...@gmail.com> wrote:
> Nevermind all. I dug the code up in one of the php scripts.
>
>
>
> On Mon, Jan 11, 2010 at 4:19 PM, Mike Mitchell <mjmit...@gmail.com> wrote:
> > Thanks! I'm looking this code and am a little lost since this toolbar does
> > a lot more than I need mine to. I see where the script is injected into the
> > page in everypage_early.js but am unable to find code that injects the
> > iframe (the toolbar) into the top of the page. I am able to inject a node
> > into the page but it comes at the bottom of the body. This code may be
> > hidden in a php module in the stumbleupon extension but any help would be
> > greatly appreciated! Thanks again.
>
> > On Sat, Jan 9, 2010 at 12:57 PM, Brian Kennish <bkenn...@chromium.org>wrote:
>
> >> On Sat, Jan 9, 2010 at 12:51 PM, Mike Mitchell <mjmit...@gmail.com>
> >> wrote:
> >> > Sorry, I'm sort of new to this but how do you get at the .crx file? All
> >> I
> >> > see is an install button and then I'm not sure where it puts the .crx
> >> > file...
>
> >> You can just right click the button and "Save link as..."
-- 
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to