Added spoiler support.

This commit is contained in:
rainbow napkin 2025-01-11 01:30:25 -05:00
parent b56c9a3365
commit 77bc549653
9 changed files with 182 additions and 71 deletions

View file

@ -159,9 +159,10 @@ class chatBox{
const match = this.checkAutocomplete();
//Set placeholder to space out the autocomplete display
this.autocompletePlaceholder.innerHTML = this.chatPrompt.value;
//Use text content because it's unescaped, and while this only effects local users, it'll keep someone from noticing and whinging about it
this.autocompletePlaceholder.textContent = this.chatPrompt.value;
//Set the autocomplete display
this.autocompleteDisplay.innerHTML = match.match.replace(match.word, '');
this.autocompleteDisplay.textContent = match.match.replace(match.word, '');
}
tabComplete(event){