Update main.js

added touch support