Tweaking js in "preparing for chess project"