a small javascript pull-to-refresh script