add page visibility api