I'm working on an extension where I have to show a different popup for different conditions being met. Specifically, I show a login popup if the user is not logged in, and I show a normal popup if the user is logged in. I can't have a default popup because I want to onClicked event for the pageAction.
If I add a chrome.pageAction.setPopup inside the chrome.pageAction.onClicked event handler, I have to click the pageAction icon once again to see the popup, because setPopup only sets which popup to show. I've searched through the Chrome API documentation, and I couldn't find any method to show the popup.
What I need is to know when the pageAction icon is clicked, and then show the popup. I could set the popup inside of a chrome.tabs.onUpdated event handler, but that would mean I wouldn't get the onClicked event. So is there some way to set and show the popup at once, or to know when the icon is clicked and show the popup at the same time?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/38259d0f-af87-48a5-96be-eea1b994e7ad%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.