moving JS into an external file to avoid Github Pages weird CDATA wrappers