title: Page visibility API in Google Chrome
body: <p>When using the page visibility API in Google Chrome the event is fired twice.
  This is some thing that happen only in Chrome.</p>
  
  <pre><code>document.addEventListener('visibilitychange', function(e) {
      if (!document.hidden) {
          console.log(e);
      }
  });
  </code></pre>
  
  <p>By what I know of the API the event is suppose to fire once.
  I am trying to fire it once regardless the browser.</p>