Update index.js

fix ajax
Merge pull request #1 from ambulong/master

Update index.js