use textContent rather than innerText
This commit is contained in:
parent
3eb7ff7bae
commit
4d1b375c35
|
@ -17,14 +17,14 @@ function changeWord() {
|
|||
var newWord;
|
||||
do {
|
||||
newWord = randomChoice(wordList);
|
||||
} while (newWord === wordEl.innerText);
|
||||
} while (newWord === wordEl.textContent);
|
||||
|
||||
var newColor;
|
||||
do {
|
||||
newColor = randomChoice(colors);
|
||||
} while (newColor === wordEl.style.color);
|
||||
|
||||
wordEl.innerText = newWord;
|
||||
wordEl.textContent = newWord;
|
||||
wordEl.style.color = newColor;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ var progress = 0;
|
|||
var progressInterval;
|
||||
function makeProgress() {
|
||||
if (progress >= 100) {
|
||||
document.getElementById("status").innerText = "SLEEP";
|
||||
document.getElementById("status").textContent = "SLEEP";
|
||||
document.getElementById("back").style.display = "inline";
|
||||
document.getElementById("reload").style.display = "inline";
|
||||
clearInterval(progressInterval);
|
||||
|
@ -74,7 +74,7 @@ function updateStatus() {
|
|||
} else {
|
||||
newStatus = randomChoice(boringStatuses);
|
||||
}
|
||||
document.getElementById("status").innerText = newStatus;
|
||||
document.getElementById("status").textContent = newStatus;
|
||||
}
|
||||
|
||||
for (let el of document.getElementsByTagName("input")) {
|
||||
|
|
Loading…
Reference in a new issue