Update patapata.js to the latest implementation

The previous patapata.js is so old one that it is differ from the usage description.
In this commit, the implementation is updated to the latest one.