I think this function could be expressed more succinctly:

```coffeescript
pageIsVisible: ->
  document.hasFocus() and (document.hidden ? document.webkitHidden)
```

or if you were including the Mozilla API:

```coffeescript
(document.hidden ? document.webkitHidden ? document.mozHidden)
```