This will not work, since the `pagemode` parameter is called "bookmarks" in the spec, but it's called "outline" in PDF.js (don't ask me why). Change this line to `(params.pagemode === 'bookmarks' instead.