Merge pull request #1 from YaManicKill/master

Merge upstream.
Fall back to XHR polling on port 80 if connecting on port 8080 fails.
When running on localhost, use port 1337.
Merge pull request #44 from Cu3PO42/fallback-to-xhr-80

Fallback to xhr 80