Put the initial javascript, to start each window, in its own js file.

Easier to read and maintain this way.
I hope this encourages us to put more functions here,
and fewer js functions built through the C api.