Edited chat.js to pass linter warnings