Amida Kuji (aka ghost leg) written in JavaScript