Making js safe for #128

Still problems with nonces?