You would have to listen on some events
http://code.google.com/chrome/extensions/tabs.html#events and if the url
what you want, you set the pageAction icon appropriately. Remember this
should be in the background page and you must have permission to access
"tabs"

- Mohamed Mansour


On Fri, Dec 11, 2009 at 12:03 PM, Darth Caniac <darthcan...@gmail.com>wrote:

> How can I detect if the current tab is on a specific page, (eg
> http://google.com (or www.google.com or http://www.google.com, etc))
> and if it is, put a icon in the URL bar?
>
> I am guessing its something like this:
>
> if tab.url = "http://www.google.com/";
>  {
>  chrome.pageAction.setIcon({path: "icon.png",tabId: tab.id});
>  chrome.pageAction.setTitle({title: "You are on google.com!", tabId:
> tab.id});
>  });
>
> however, that does not work :-(
> a little help? :-)
>
> --
>
> 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