[js] gamebook fixes and enhancements