@@ -94,37 +94,37 @@ function getAuthorNote (notif: Notification): Node {
94
94
95
95
if ( notif . modNickname ) {
96
96
/* Moderator Message */
97
- authorTag . innerHTML = notif . modNickname ;
97
+ authorTag . textContent = notif . modNickname ;
98
98
noteTag . appendChild ( authorTag ) ;
99
- noteTag . innerText = noteTag . innerText + " sent you a guardian message:" ;
99
+ noteTag . textContent = noteTag . textContent + " sent you a guardian message:" ;
100
100
} else if ( notif . authorNickname ) {
101
101
/* New Comment or Reply */
102
- authorTag . innerHTML = notif . authorNickname ;
102
+ authorTag . textContent = notif . authorNickname ;
103
103
noteTag . appendChild ( authorTag ) ;
104
- noteTag . innerText = noteTag . innerText + " added a comment on " ;
105
- titleTag . innerHTML = notif . translatedFocusTitle || notif . translatedScratchpadTitle || "" ;
104
+ noteTag . textContent = noteTag . textContent + " added a comment on " ;
105
+ titleTag . textContent = notif . translatedFocusTitle || notif . translatedScratchpadTitle || "" ;
106
106
noteTag . appendChild ( titleTag ) ;
107
107
} else if ( notif . coachName && notif . contentTitle ) {
108
108
/* Coach Assignment */
109
- authorTag . innerHTML = notif . coachName ;
109
+ authorTag . textContent = notif . coachName ;
110
110
noteTag . appendChild ( authorTag ) ;
111
- noteTag . innerText = noteTag . innerText + " assigned you " ;
112
- titleTag . innerHTML = notif . contentTitle ;
111
+ noteTag . textContent = noteTag . textContent + " assigned you " ;
112
+ titleTag . textContent = notif . contentTitle ;
113
113
noteTag . appendChild ( titleTag ) ;
114
114
} else if ( notif . missionName && notif . class_ . includes ( "ClassMissionNotification" ) ) {
115
115
/* New Mission */
116
- noteTag . innerText = "New Mission: " ;
117
- authorTag . innerHTML = notif . missionName ;
116
+ noteTag . textContent = "New Mission: " ;
117
+ authorTag . textContent = notif . missionName ;
118
118
noteTag . appendChild ( authorTag ) ;
119
119
} else if ( notif . translatedDisplayName && notif . class_ . includes ( "RewardNotification" ) ) {
120
120
/* New Reward (?) */
121
- noteTag . innerText = "New Reward: " ;
122
- authorTag . innerHTML = notif . translatedDisplayName ;
121
+ noteTag . textContent = "New Reward: " ;
122
+ authorTag . textContent = notif . translatedDisplayName ;
123
123
noteTag . appendChild ( authorTag ) ;
124
124
} else if ( notif . iconSrc && notif . extendedDescription && notif . description ) {
125
125
/* New Badge */
126
- noteTag . innerText = "New Badge: " ;
127
- authorTag . innerHTML = notif . description ;
126
+ noteTag . textContent = "New Badge: " ;
127
+ authorTag . textContent = notif . description ;
128
128
noteTag . appendChild ( authorTag ) ;
129
129
}
130
130
@@ -148,11 +148,11 @@ function genNotif (notif: NotifElm): Node {
148
148
149
149
const contentTag = document . createElement ( "p" ) ;
150
150
contentTag . className = "notif-content" ;
151
- contentTag . innerText = notif . content ;
151
+ contentTag . textContent = notif . content ;
152
152
153
153
const dateTag = document . createElement ( "div" ) ;
154
154
dateTag . className = "notif-date" ;
155
- dateTag . innerText = notif . date ;
155
+ dateTag . textContent = notif . date ;
156
156
157
157
wrapTag . appendChild ( imgTag ) ;
158
158
wrapTag . appendChild ( notif . authorNote ) ;
@@ -168,7 +168,7 @@ function genNotif (notif: NotifElm): Node {
168
168
169
169
const replyButtonTag = document . createElement ( "a" ) ;
170
170
replyButtonTag . className = "reply-button" ;
171
- replyButtonTag . innerText = "Reply" ;
171
+ replyButtonTag . textContent = "Reply" ;
172
172
173
173
const replyTextTag = document . createElement ( "textarea" ) ;
174
174
replyTextTag . className = "reply-text hide" ;
@@ -257,7 +257,7 @@ function fkeyNotFound () {
257
257
notifsContainer ! . innerHTML = "" ;
258
258
const infoTag = document . createElement ( "h2" ) ;
259
259
infoTag . className = "please-sign-in" ;
260
- infoTag . innerText = "Please visit KA and make sure you're signed in" ;
260
+ infoTag . textContent = "Please visit KA and make sure you're signed in" ;
261
261
notifsContainer ! . appendChild ( infoTag ) ;
262
262
}
263
263
0 commit comments