.js: In GitHub TOC, fix bug detecting page ready

Previously, we would check document.readyState. If it was "complete", we
would run our setup code immediately, If not, we'd trigger it when
document.on("ready").

However, this wasn't accounting for the readyState of "interactive" (DOM
parsed, but resources may not be loaded.) document.on("ready") fires as
soon as the document reaches the interactive state. This meant that if
we were already interactive, we weren't detecting that as ready, and
were waiting around for the ready event, which never came.

This change runs the setup code immediately if the document is
interactive or done.