Sorry, sometimes we get a bit behind on the weekend :) -Nick
On Tue, Oct 27, 2009 at 8:52 PM, Ali B. <[email protected]> wrote: > > > On Wed, Oct 28, 2009 at 6:10 AM, Anders Sahlin <[email protected]> wrote: >> >>> >>> As the author of that extension I fully agree with your reply. :) >> >> > Ah. Good to know :) > > > The trick is not loading any static HTML in the popup body before the >> call to window.close() is made. This way the visible popup will be >> very small since it automatically resizes and it will be nearly >> impossible to see it before it closes. However, I agree that there >> should be some other way of doing this. I think the "workaround" >> solution is creating a memory leak as well (the content is not >> unloaded when the closing call is made, or something like that). I've >> starred the feature request, hope you find a good solution :) >> > > That makes sense. Thanks for clarifying that. And yes, I agree that leaving > the content there when not displayed is an unnecessary resource consumption. > > PS: I posted my reply about a day and a half ago. It just took until now to > be moderated (hint hint :D). > > >> Regards, >> Anders a.k.a. destructoBOT >> >> On Oct 26, 4:52 pm, "Ali B." <[email protected]> wrote: >> > 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./dmondarkhttp://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 >> >> >> >> >> -- >> Ali >> http://awhitebox.com >> > > > > -- > Ali > http://awhitebox.com > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
