You can do this using a Custom Book Theme.
You can get to the Book Theme option in the Book Tools menu for a book by clicking "Writing" and then selecting "Book Theme." Then, choose the "Custom" option if it is available for your book (books on a Free plan don't have Custom options unlocked).
Once you've selected the Custom theme option, you can change what is shown in the Table of Contents by choosing an option in the "Table of Contents" section.
Once you've selected your preferred option, click the blue "Update Theme" button at the bottom of the page.