JavaScript implementation of Qlock