Whoops, this wasn't part of the solution.

```main.js``` was initializing ```notes_page``` to `, but ```show_thread.js``` was not so it wouldn't paginate correctly. Solution is to initialize all threads with page == 1.