Explicitly handle .js files as text so that JS attachment can be previewed.

Currently JavaScript attachment is not recognized as text, so it cannot be previewed.
Though it's mime type is application/javascript, it actually is text.
I think it's natural to handle it as text file to preview it.