Javascript API for fun