Getting current window on a popup (google chrome extension)
- by Steinn
Hi, i'm building a google chrome extension, and i'm trying to get the selected window in a popup. (i'm talking about the popup that shows when you click in the extesion icon).
I try to use the documentation, but i didn't get it well.
I tryied to use:
chrome.windows.getCurrent(function(w) {
chrome.windows.get(w.id,
function (response){
alert(response.location.href);
});
});
But didn't work.
Any ideas?
Thanks
(sorry if the english is bad).