fix bar offset
use prefixed webkit PageVisibilityAPI