I don't think there is a built-in method to do this, but what's stopping you from using sites to format JS code? Js-beautify should meet your needs.