html5 page visibility apiを試す https://hai3.net/blog/html5-page-visibility-api/