Update main.js

Update for #130 to handle previewing application when edit is the first url parameter.