api.onPageChange werkt niet met eindeloos scrollen

You don’t need a plugin, this is client side. Use a Theme Component.