mains js