Chat plugin javascript