Update main.js

Send button logic