compress javascript file by basic method