LiveTwitchStreams

function parseTwitch(twit) {

if ( twit.streams.length == 0){ document.getElementById('LiveOnTwitch').style.display = 'none'; }

for (var i = 0; i < twit.streams.length; i++){ document.getElementById('twitchOutput').innerHTML += "  " + twit.streams[i].channel["display_name"] + " " + twit.streams[i].viewers + " Viewers "; }

} var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://api.twitch.tv/kraken/streams?game=TowerFall+Ascension&callback=parseTwitch '; document.body.appendChild(script);