1st - I would put your moduleDidLoad() function definition -above-
where you use it on the body tag.
I modify the experience of Google in my extension - but it looks like
you want to -intercept- it.
I would recommend using the webRequest's onBeforeRequest event to
redirect to another page of yours..
You could also present page A via a modification technique instead of
interception - simply setup a content script to be injected to all
www.google.com pages you want to intercept, be sure to inject on
document_start, and inject css that hides the page body, and insert
your page.
On May 10, 12:31 pm, Jaikumar G <
jaieni...@gmail.com> wrote:
> Folks,
>
> I start chrome from the command line with a default page loaded.
>
> The default page is below.
>
> <html>
> <body onload="moduleDidLoad()">
> <object id = "blah"/>
> <script>
> function moduleDidLoad() {
> id = document.getElement("blah");
> // Call some function on id
> }
>
> function urlLoad(url) {
> }
> </script>
> </html>
>
> Chrome also has an extension associated with it.
> This extension has a java script file tagged as background.
> It intercepts the url.
> So when the user
typeswww.google.com, I need to send the urlwww.google.comto urlLoad function in page A and prevent the new page
> associated withwww.google.comfrom getting loaded. I need chrome to