add some javascript functionality on the chat section