reduce page with js