Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Kelly Slab' rel='stylesheet'>
<body>
<div class="container text-center">
  <h1> Twitch.tv Api Call </h1>
  <div class="row">
    <div class="col-sm-3"></div>
    <div class="col-sm-6">
  <a href="https://www.twitch.tv/freecodecamp" target="blank"><h3 id="fccstatus" class="qwe"></h3></a>
    </div>
    <div class="col-sm-3 b1">
      <button id="online" class="btn b2">Online</button>
    <button id="all" class="btn b2">All</button>
    <button id="offline" class="btn b2">Offline</button>
    </div>
    </div>
  <div class="row well xyz a1">
    <div class="col-sm-4">
      <h3>Logo</h3>
    </div>
    <div class="col-sm-4">
      <h3>Links</h3>
    </div>
    <div class="col-sm-4">
      <h3>Status</h3>
    </div>
  </div>
  <div id="followerinfo">
  </div>
</div>
</body>
              
            
!

CSS

              
                img{
  height:100px;
  width:100px;
  border: 1px solid #999;
	background-color: black;
	padding: 4px;
}
.abc{
  align-text:center;
  margin-top:35px;
  color:gold;
  font-size:20px;
}
.xyz{
  border-radius:50px;
  opacity:0.9;
  font-family: 'Droid+Serif';
}
body{
  background:url('http://omeletta.me/wp-content/uploads/2017/07/web-page-background-color-html-and-for-inside.jpg');
}
h1{
  color:gold;
  text-decoration:underline;
  font-family: 'Droid+Serif';
}
a{
  text-decoration:none;
  color:white;
  font-family: 'Sofia';
}
a:hover{
  color:black;
  text-decoration:none;
}
h3{
  color:gold;
}
.a1{
 background:none; 
}
.qwe{
  color:white;
}
.qwe:hover{
  color:black;
  text-decoration:none;
}
.a2{
  height:100px;
  background:none;
  border:none;
}
.a2:hover{
  border-right:1px solid white;
  border-left:1px solid white;
}
.z1{
  font-family: 'Kelly Slab';
}
.b1{
  margin-top:15px;
  color:black;
  font-family:sofia;
}
.b2{
 backgorund:black;
  border-radius:5px;
  border-color:3px solid black;
}
.b3{
  border:4px solid green;
}
              
            
!

JS

              
                $(document).ready(function(){
  var masterChannel="freecodecamp";
  var followersUrl="https://wind-bow.glitch.me/twitch-api/users/"+masterChannel+"/follows/channels";
  var channelsUrl="https://wind-bow.glitch.me/twitch-api/channels/";
  var streamsUrl="https://wind-bow.glitch.me/twitch-api/streams/";
  $.getJSON(streamsUrl+masterChannel).done(function(live){
    $("#fccstatus").html(!live.stream?"Freecodecamp is currenty OFFLINE":"Freecodecamp is currenty ONLINE");
  });
$.getJSON(followersUrl).done(function(followers){
  for(var i=0;i<followers.follows.length;i++){
    var followerName=followers.follows[i].channel.name;
    $.getJSON(channelsUrl+followerName).done(function(channel){
    var channelUrl=channel.url;
    var channelName=channel.name;
    var channelUsername=channel.logo;
    $.getJSON(streamsUrl+channelName).done(function(live){
      var status=!live.stream?'Offline':'Online';
      $("#followerinfo").prepend("<div class='row well a2'>"+"<div class='col-sm-4'>"+"<img src="+channelUsername+">"+"</div>"+"<div class='col-sm-4 abc'>"+"<a href="+channelUrl+">"+channelUrl+"</a>"+"</div>"+"<div class='col-sm-4 abc z1'>"+status+"</div>"+"</div>");
    });
  });
  }
});
  $("#online").click(function(){
    $("#followerinfo").empty();
    $("#online").addClass("b3");
    $("#all").removeClass("b3");
    $("#offline").removeClass("b3");
  $.getJSON(followersUrl).done(function(followers1){
  for(var i=0;i<followers1.follows.length;i++){
    var followerName1=followers1.follows[i].channel.name;
    $.getJSON(channelsUrl+followerName1).done(function(channel1){
    var channelUrl1=channel1.url;
    var channelName1=channel1.name;
    var channelUsername1=channel1.logo;
    $.getJSON(streamsUrl+channelName1).done(function(live1){
      var status1=!live1.stream?'Offline':'Online';
      if(status1=="Online"){
      $("#followerinfo").prepend("<div class='row well a2'>"+"<div class='col-sm-4'>"+"<img src="+channelUsername1+">"+"</div>"+"<div class='col-sm-4 abc'>"+"<a href="+channelUrl1+">"+channelUrl1+"</a>"+"</div>"+"<div class='col-sm-4 abc z1'>"+status1+"</div>"+"</div>");
      }
    });
  });
  }
});
  })
  
  $("#all").click(function(){
    $("#online").removeClass("b3");
    $("#all").addClass("b3");
    $("#offline").removeClass("b3");
   $.getJSON(followersUrl).done(function(followers){
  for(var i=0;i<followers.follows.length;i++){
    var followerName=followers.follows[i].channel.name;
    $.getJSON(channelsUrl+followerName).done(function(channel){
    var channelUrl=channel.url;
    var channelName=channel.name;
    var channelUsername=channel.logo;
    $.getJSON(streamsUrl+channelName).done(function(live){
      var status=!live.stream?'Offline':'Online';
      $("#followerinfo").prepend("<div class='row well a2'>"+"<div class='col-sm-4'>"+"<img src="+channelUsername+">"+"</div>"+"<div class='col-sm-4 abc'>"+"<a href="+channelUrl+">"+channelUrl+"</a>"+"</div>"+"<div class='col-sm-4 abc z1'>"+status+"</div>"+"</div>");
    });
  });
  }
}); 
  })
 
  $("#offline").click(function(){
   $("#followerinfo").empty();
    $("#online").removeClass("b3");
    $("#all").removeClass("b3");
    $("#offline").addClass("b3");
  $.getJSON(followersUrl).done(function(followers1){
  for(var i=0;i<followers1.follows.length;i++){
    var followerName1=followers1.follows[i].channel.name;
    $.getJSON(channelsUrl+followerName1).done(function(channel1){
    var channelUrl1=channel1.url;
    var channelName1=channel1.name;
    var channelUsername1=channel1.logo;
    $.getJSON(streamsUrl+channelName1).done(function(live1){
      var status1=!live1.stream?'Offline':'Online';
      if(status1=="Offline"){
      $("#followerinfo").prepend("<div class='row well a2'>"+"<div class='col-sm-4'>"+"<img src="+channelUsername1+">"+"</div>"+"<div class='col-sm-4 abc'>"+"<a href="+channelUrl1+">"+channelUrl1+"</a>"+"</div>"+"<div class='col-sm-4 abc z1'>"+status1+"</div>"+"</div>");
      }
    });
  });
  }
}); 
  })
  
});

              
            
!
999px

Console