I use Visibility API script from here: Detect if browser tab is active or user has switched away
Everything working ok, but when I swich another app window, the first window browser should return "not visible" as document title but it doesn't work in that way. For example, I use Chrome browser and then I click to Mozilla Firefox browser - first widnow (Chrome) is "not visible" now because Firefox window is visible now. But chrome window always return "visible" status.
I tried use this:
return function(c)
    {
        if (c)
        {
            document.addEventListener(eventKey, c);
            document.addEventListener("blur", c); // THIS
            document.addEventListener("focus", c); // AND THIS
        }
        return !document[stateKey];
    }
but it doesn't work too. Anyone can help me? Thanks.
