add stat javascript