Replaced element.innerText with element.textContent 

so that it works in Firefox