new JS API

`jsExt.js` is a JS extension for general purpose. I believe it will be
handy in other projects even with no relationship with law.