Update max pages in popup