Skip to content

Instantly share code, notes, and snippets.

@leovarmak
Created April 28, 2017 09:33
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 leovarmak/9d64203114bfbd13a61090bd4df86af8 to your computer and use it in GitHub Desktop.
Save leovarmak/9d64203114bfbd13a61090bd4df86af8 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/leovarmak/fb90d3f8323a0236ed17e707c83ecce7/raw/11e9a5bf58f30abe2cdf59ff5df4cd6a8c8ae26e/jquery.ajax-cross-origin.min.js"></script>
<script>
$(document).ready(function(){
getStats();
setInterval(function(){ // This functions automatically
getStats(); // sends a G request every 60 seconds
}, 60000);
function getStats() {
$.ajax({
crossOrigin: true,
url: "https://crowbar.steamstat.us/Barney",
dataType: "json",
context: {},
success: function(data) {
var json = JSON.parse(data);
alert(json.services.dota2.status)
console.log(json);
}
})
}
});
</script>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment