Update main.js

Handle bitly case.