Converted TOC to use cross-browser compatible textContent instead of innerText (which doesn't work on Firefox and a few other browsers)