turn off livestats update when the tab isn't active

Fixes #330: Turning off the updating when the tab isn't active

When the tab is not visible from the user, the livestats refresh are
stopped. As soon as its visibility changes (from visibilitychange
API), the livestats are refreshed as usual.

This will prevent unnecessary calls to the different services when the
tab is hidden from the user.
This commit is contained in:
Guillaume Taquet Gasperini
2019-05-20 21:42:42 +02:00
parent 4980bfab12
commit b5b25458db
2 changed files with 48 additions and 6 deletions

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long