Fixed an issue where Firefox would not display title of document properly.

Firefox does not implement .innerText, so an if/else statement has been worked to handle it and uses .textContent instead.