Removes unnecessary pagination code

Pagination values were being calculated in the JavaScript when they're
already defined in the next/prev button href attributes on the
server-side. This commit removes the JS unneeded JS code.