You can do that by adding some condition in the popup page itself:
<html>
<head>
<script>
function init() {
if( SomeCondition ) {
//Open some URL and close the popup.
chrome.tabs.create({url: "http://yourloginpage.com"});
window.close();
} else {
// Some other stuff to do with the popup here
}
}
</script>
</head>
<body id="body" onload="init()">
<!-- Body of your popup if you'd like to have "static" content -->
</body>
</html>
I'd recommend taking a look at destructoBOT's Gmail checker. It's a
modified version of Chromium's sample extension that uses a popup and
does exactly what you are asking about:
http://www.chromeextensions.org/alerts-updates/gmail-checker/
Hope that helps,
Cheers
--
Ali B./dmondark
http://awhitebox.com
On Oct 27, 2:24 am, Markitusss <[email protected]> wrote:
> Hi all,
>
> Is it possible not to show up the Browser Action popup for a given use
> case? For example if we have the Browser Action in a not signed in
> state, we want that clicking on it will show the login page, but f the
> user is logged in, we want to show the popup with useful info. Is his
> possible? Or do we have to show and hide an empty popup?
>
> Another solution might be to have some login info inside the popup
> when not logged in.
>
> Thanks,
>
> Marcos
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---