Updated javascript main.js and Makefile.am

There is work to be done on the javascript example itself so this is just
a backup the changes I made yesterday to bring main.js and
Makefile.am up to date.