Some more javascript fixes to support CSP headers
All the inline javascript that is legit for the browser to run must be
using a nonce, without that things will no work.
This commit fixes a few missing ones and a bit of indentation/style.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>