updated javascript plugin