compress js for scroll