Custom pager breaks when updating from DataTables v1 to v2
Custom pager breaks when updating from DataTables v1 to v2

I'm using the following custom pager and when upgrading from DataTables v1 to v2 it appears that the 2 parameters (page and pages) are no longer provided. I realise this plugin is 9 years old, but how can I make a similar pager that works with DataTables v2?
https://datatables.net/plug-ins/pagination/full_numbers_no_ellipses
Thank you