Check active page before running front-end JS