Fix JS coding style

TODO: rebase this as a fixup. I don't think the github web interface supports that.