First draft of JS plugin