Fix indexOf typo

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Make function expression syntax consistent

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
addChat => addChatForm to avoid the confusion redeclaration by same name inside the submit handler

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Cache any id'ed elements once and for all time.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
DRY-out muted user checked

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>