xg index js