That's not a bad idea. I'll give that a try.

On Wed, Jan 20, 2010 at 11:23 PM, Aaron Boodman <[email protected]> wrote:

> Hm, so onFocusChanged doesn't fire at all when all of Chrome is blurred?
> Lame.
>
> You could try running a content script on every top level tab that
> tracks blur and focus events
> (window.addEventListener("blur"|"focus")). If you get a blur but then
> no focus, assume that the whole browser is blurred.
>
> Not super elegant but might work. It would be nice if onFocusChanged
> worked though.
>
> - a
>
> On Wed, Jan 20, 2010 at 11:05 PM, Warren Benedetto
> <[email protected]> wrote:
> > I just released an extension (StayFocusd) which allows you to create a
> > blacklist of time-wasting websites, and then prevents you from
> > accessing them once time runs out. The elapsed time counts down
> > whenever you are on one of the blacklisted sites.
> >
> > The problem is, if you're on a blacklisted site, and then you minimize
> > Chrome or maximize another site in front of it, the countdown on the
> > blacklisted site continues. I'd like to be able to stop the countdown
> > when Chrome is not the active window.
> >
> > I see the chrome.windows.onFocusChanged() event, but that doesn't seem
> > to do what I need. It detects when focus changes between different
> > Chrome instances, but not when focus changes from Chrome to another
> > app.
> >
> > Are there any existing APIs that I can use to accomplish what I need?
> > If not, are there any plans for something like this?
> >
> > --
> > 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]<chromium-extensions%[email protected]>
> .
> > 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 [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.

Reply via email to