adding javascript for chatlist