new way to do per page javascript