Update auto-pagination.min.js

Update the two functions