refine js file format