Yeah you are right, it's hard to make sure which part of visibilitychange should be listened. Maybe we don't have to create a single file but aggregate them in one of these js files instead.