Replace innerText with textContent

This commit is contained in:
2018-06-28 15:30:24 +09:00
parent 00678cf6a4
commit 050355d8ae
9 changed files with 26 additions and 25 deletions

View File

@ -4,7 +4,7 @@ import AnimeNotifier from "../AnimeNotifier"
export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api)
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You are now following " + document.getElementById("nick").innerText + "."))
.then(() => arn.statusMessage.showInfo("You are now following " + document.getElementById("nick").textContent + "."))
.catch(err => arn.statusMessage.showError(err))
}
@ -12,6 +12,6 @@ export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
export function unfollowUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api)
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You stopped following " + document.getElementById("nick").innerText + "."))
.then(() => arn.statusMessage.showInfo("You stopped following " + document.getElementById("nick").textContent + "."))
.catch(err => arn.statusMessage.showError(err))
}