The instant "real URL" could be a redirection and then it is not really the
"real URL".

☆PhistucK


On Tue, Dec 8, 2009 at 17:43, Jiaqin <jiaqi...@gmail.com> wrote:

> Hi Antony,
>
> Thank you very much, I can now get the real url when the update event
> comes. But I have another problem:
>
> The first time I visit an unavailable url, I have to wait for a long
> time until the tab turns into the "This webpage is not available" tab
> and then the first Update event comes. But I'm wondering why I should
> have been waiting for so long? I mean, the tab should have known its
> real url when it was created, or at least before it start to send the
> network request.
>
>
> On Dec 8, 3:23 am, Antony Sargent <asarg...@chromium.org> wrote:
> > You'll need to add a listener for chrome.tabs.onUpdated as well. The tab
> > will initially be created with a null url, but then you'll get update
> events
> > with the real url.
> >
> >
> >
> > On Sat, Dec 5, 2009 at 10:30 PM, Jiaqin <jiaqi...@gmail.com> wrote:
> > > Hi all,
> >
> > > I'm new to the Chrome extensions, and I'm thinking of such an
> > > extension, which will detect every link clicked by the user, and if
> > > meeting a specific url, the extension will do some work, otherwise, it
> > > does nothing.
> >
> > > I use the code like this, suppose every link is opened in a new tab:
> >
> > > chrome.tabs.onCreated.addListener(function(tab) {
> > >  alert(tab.url);
> > > });
> >
> > > However, I have a problem when I click to open a url that is not
> > > available ( actually is blocked by my network provider ). In this
> > > case, I just got a url of null.
> >
> > > Is there any way for me to get the real url? I need this because my
> > > extension is just being designed to deal with this unavailable-url
> > > condition...
> >
> > > Thank you!
> >
> > > --
> >
> > > 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<chromium-extensions%2bunsubscr...@googlegroups.com><chromium-extensions%2Bunsu
> bscr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/chromium-extensions?hl=en.
>
> --
>
> 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<chromium-extensions%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>

--

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