Thanks to @dezgeg for prototype implementation, I've cleaned it up and added documentation.
manual
manualHTML