Skip to content

Instantly share code, notes, and snippets.

@awwong1
Last active January 9, 2016 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awwong1/41420c35eea7f94dd86a to your computer and use it in GitHub Desktop.
Save awwong1/41420c35eea7f94dd86a to your computer and use it in GitHub Desktop.
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', '/static/common/js/testing.js', true);
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === XMLHttpRequest.DONE) {
eval(xmlhttp.responseText);
update_match_details = function (data) {
console.log('match_token: ' + data.match_token);
console.log('internal_ip: ' + data.internal_ip);
var bridge_info = data.bridge_info;
console.log('watchLink: ' + get_match_link(data.server_ip, bridge_info.bridge_host, bridge_info.bridge_port, data.match_token));
}
start_test_match();
}
};
xmlhttp.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment