simplify js for mobile devices