Only update stage if visible

Use document.hidden to check if the page is visible