title: Detect if tab is active? (different from focus)
body: <p>My Javascript uses a timer to refresh the CSS of a page. I like to have it run when Safari is in the background and I'm making changes in my code editor, but I don't want it to run when it's not in the active browser tab.</p>
  
  <p><code>window.blur</code> and <code>window.focus</code> get triggered when another tab is in focus, but they also get triggered when the tab is active and Safari is in the background, so they don't help me here. </p>
  
  <p>How do I detect solely if the tab my Javascript is running in is currently active?</p>