using page visibility to fire or not notifications