javascript pidgin