Problem with API when run it on Firefox (error code:1000)

@pedrochristo

I try to using source in below article
It can run on both Firefox and Chrome normally.

Hope this will be useful