use textContent rather than innerText

This commit is contained in:
xenofem 2020-11-20 14:04:08 -05:00
parent 3eb7ff7bae
commit 4d1b375c35
2 changed files with 4 additions and 4 deletions

View file

@ -17,14 +17,14 @@ function changeWord() {
var newWord; var newWord;
do { do {
newWord = randomChoice(wordList); newWord = randomChoice(wordList);
} while (newWord === wordEl.innerText); } while (newWord === wordEl.textContent);
var newColor; var newColor;
do { do {
newColor = randomChoice(colors); newColor = randomChoice(colors);
} while (newColor === wordEl.style.color); } while (newColor === wordEl.style.color);
wordEl.innerText = newWord; wordEl.textContent = newWord;
wordEl.style.color = newColor; wordEl.style.color = newColor;
} }

View file

@ -49,7 +49,7 @@ var progress = 0;
var progressInterval; var progressInterval;
function makeProgress() { function makeProgress() {
if (progress >= 100) { if (progress >= 100) {
document.getElementById("status").innerText = "SLEEP"; document.getElementById("status").textContent = "SLEEP";
document.getElementById("back").style.display = "inline"; document.getElementById("back").style.display = "inline";
document.getElementById("reload").style.display = "inline"; document.getElementById("reload").style.display = "inline";
clearInterval(progressInterval); clearInterval(progressInterval);
@ -74,7 +74,7 @@ function updateStatus() {
} else { } else {
newStatus = randomChoice(boringStatuses); newStatus = randomChoice(boringStatuses);
} }
document.getElementById("status").innerText = newStatus; document.getElementById("status").textContent = newStatus;
} }
for (let el of document.getElementsByTagName("input")) { for (let el of document.getElementsByTagName("input")) {