Rebuilt the register module, write the javascript myself.


Signed-off-by: Winguse <github@winguse.com>