I am making a website that needs to get the listings from the steam community market. I know how to get the JSON, but I'm getting a console error: Uncaught SecurityError: Failed to set the 'domain' property on 'Document': 'https://steamcommunity.com/' is not a suffix of ''.
It looks like I set the wrong domain. Does anyone know the correct domain I need to use?
My JavaScript code:
<script>
document.domain = "https://steamcommunity.com/";
$(document).ready(function() {
$.getJSON("http://steamcommunity.com/market/priceoverview/?country=US¤cy=1&appid=730&market_hash_name=P90%20%7C%20Asiimov%20%28Factory%20New%29", function(results) {
$("#price").text(results.lowest_price);
});
});
</script>