add newlines after custom javascript

so if the script ends with a comment line, it doesn't cause a syntax error