Hey Pedro,
I copy and pasted your code in my browser action file to write out the
current tab url, but its coming up blank.
chrome.tabs.getSelected(null, function(tab) {
document.writeln(tab.url); // do what you want
});
I've also set permissions to include tabs. Do you know what I may be
doing wrong?
Thanks.
On Dec 10, 11:17 am, aravi <[email protected]> wrote:
> Hi,
>
> I have a similar problem with a very simple thing I suppose in opening
> links in my popup HTML document in new tabs
>
> I have set permissions for tabs and can open new tabs for any links
> using chrome.tabs but unable to have any control over a flash object
> that am enbedding which has internal links. Is there a way to capture
> the onclick events inside the flash object, grab theurland open a
> newtabwith it?
>
> thanks
>
> On Dec 10, 2:26 pm, "Pedro Junior" <[email protected]> wrote:
>
> > chrome.tabs.getSelected(null, function(tab) {
> > console.log(tab.url); // do what you want
>
> > });
>
> > Remember to set permission for tabs in manifest.json >
>
> > "permissions": [
> > "tabs"
> > ]
>
> > -
> > Pedro Junior
>
> > ----- Original Message -----
> > From: "Globe199" <[email protected]>
> > To: "Chromium-extensions" <[email protected]>
> > Sent: Wednesday, December 09, 2009 3:41 PM
> > Subject: [chromium-extensions]GetcurrenttabURL
>
> > > Just starting out with chrome extensions, and I'm having a hell of a
> > > time doing something which should be so simple.
>
> > > I want togettheURLof thecurrenttab. I've tried a few things,
> > > but they either don't work or they give me the location of the
> > > extension file itself.
>
> > > Any help is appreciated. 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 [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group
> > > athttp://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.