css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">
<div id="header" class="row">
<div class="pull-left"><img src="https://konikodes.com/fcc/img/twitchLogo.jpg" alt="twitchLogo"></div>

<!-- link to FreeCodeCamp channel -->
<a href="https://www.twitch.tv/freecodecamp" target="_blank">

<br/><div id="fccStatus" class="pull-center text-center"></div>
  </a>
</div><!-- close header -->

 <div id="twitch">
 <h4 class="text-center">Free Code Camp Streamers</h4>
<div id="showMe" class="row">	
<button id="showAll" class="btn btn-primary col-sm-3" type="button">See All</button> 
<button id="showOn" class="btn btn-success col-sm-3" type="button">Online Only</button>
<button id="showOff" class="btn btn-info col-sm-3" type="button">Offline Only</button>  
</div><!-- showMe -->
	
 </div> <!-- twitch -->	
<div id="streamerInfo">
<div class="online"></div>

<div class="offline"></div>

<div class="noaccount"></div>


</div><!-- close Streamer Info -->
 <p>
   <div id="ftr" class="text-right">
<div class="me"><a href="http://www.konikodes.com" target="_blank" " title="Koni Kodes">powered by <img class="pwrd" src="https://www.konikodes.com/fcc/img/klogo.png" alt="KoniKodesLogo" /></a>
  </div></div>
</p>
</div><!-- close container -->
            
          
!
            
               body{
    width:100%;
    height:100%;
	margin:0;
	padding:0;
	border:0;
	background:#f8f9cd;
}
.container{
    width:100%;
	max-width:650px;
	margin:0 auto;
	font-size:1.2em;
	overflow:hidden;
    background:#fbf2ea;
	border-radius:10px;
} 
#header{
    display:block;
	width:100%;
	margin:0 auto;
}	
#fccStatus{
    color:#128488;
	font-size:1.6em;
	padding:0 3px;
	cursor:pointer;
}

h4{
   color:#7d500b;
   font-size:1.4em;
} 


#twitch{
    max-width:650px;
	width:98%;
	margin:0 auto;
	padding:.7em 0;
	display:inline-block;
	font-size:1.2em;
}
#showMe{
   display:inline;
   width:100%;
   margin:0 auto;
}
#showAll, #showOn, #showOff{
   padding:1px;
   margin:1em;
   font-size:1em;
   line-height:1.3em;
}

.online .row{
  margin:5px 0;
  color:#ffffff;
  line-height:2em;
  background:#9bdad9;
  border: 1px solid #128488;
  border-radius: 10px;
}

.offline .row{
  margin:5px 0;
  line-height:2.5em;
  background:#c0f3b6;
  border: 1px solid #288812;
  border-radius: 10px;  
}
.noaccount .row{
  margin:5px 0;
  line-height:3em;
  background:#d0a5d6;
  border: 1px solid #7d500b;
  border-radius: 10px;
}

img {
   height: 75px;
   width:  75px;
   padding:1px 0;
   border-radius:20%;
   border: 0 solid #ffffff; 
   border-radius: 10px;
}
#ftr {
   display: inline;
   width:70%;
   text-decoration: none;
   margin:2em auto;
}
.prt {
   display:inline;
   text-decoration:none;
}
.pwrd {
   display:inline;
   text-decoration:none;
}
#ftr img{
   float:right;
   width:40px;
   height:40px;
   border: none;
}
@media only screen and (min-width:320px) and (max-width:700px){
body {
	width:100%;
    height:100%;
	margin:0 auto;
}
.container{
    width:100%;
	max-width:650px;
	margin:0 auto;
	font-size:1em;
	overflow:hidden;
    background:#fbf2ea;
	border-radius:5px;
} 
#header{
    display:block;
	width:80%;
	margin:0 auto;
}	
#fccStatus{
    color:#128488;
	font-size:1.4em;
	padding:0;
	cursor:pointer;
}

h4{
   color:#7d500b;
   font-size:1.2em;
} 


#twitch{
    max-width:650px;
	width:98%;
	margin:0 auto;
	padding:.7em 0;
	display:inline-block;
	font-size:1.2em;
}
#showMe{
   display:inline;
   width:95%;
   margin:0 auto;
}
#showAll, #showOn, #showOff{
   padding:0;
   margin:.2em;
   font-size:1em;
   line-height:1.2em;
}

.online .row, offline .row, .noaccount .row{
  margin:0 auto;
  line-height:1.2em;
  border-radius: 5px;
}


img {
   height: 50px;
   width:  50px;
   padding:0;
   border-radius:10%;
   border: 0 solid #ffffff; 

}
}
            
          
!
            
              jQuery(document).ready(function(){
   var clientID = "m46x2vr2wd9fzaoierocnmztlbhtsuo";
   var names = ["AkiraLaine", "brianamarie132", "brunofin", "comster404", "cretetion", "ESL_SC2","habathcx", "KrisVos130", "noobs2ninjas", "OgamingSC2", "RobotCaleb", "storbeck"];
   var nopersonlogo = "https://konikodes.com/fcc/img/noperson.png";
   var nologo = "https://konikodes.com/fcc/img/nologo.png";


   
   // FCC Status Check
    $.ajax({
    type: "GET",
    url: "https://api.twitch.tv/kraken/streams/freecodecamp?client_id=m46x2vr2wd9fzaoierocnmztlbhtsuo?",
    headers: {"Client-ID": "m46x2vr2wd9fzaoierocnmztlbhtsuo"},
    dataType: "JSON",
    success: function(fccstat){

   if (fccstat.stream === null){
   $("#fccStatus").html("Free Code Camp is Currently Offline");
}   
  else{
   $("#fccStatus").html("Free Code Camp is Currently Online");
}  

var getData = function (user) {
    var getStatus = function () {
        //Main ajax function that request for streams/user.
        $.ajax({
            url: 'https://api.twitch.tv/kraken/streams/' + user
            , dataType: "json"
            , headers: {
                'Client-ID': 'm46x2vr2wd9fzaoierocnmztlbhtsuo'
            }
            //Check Account Closed
            , statusCode: {
                404: function (xhr)
                  {
    console.log(user + " has no account");             
         logo = 'https://konikodes.com/fcc/img/nologo.png';
	 $(".noaccount").prepend("<div class ='row'>" + "<div class='col-sm-4'>" +
    "<img src='" + nopersonlogo + "'>" + "</div>" + "<div class='col-sm-4'>" + user + "</div>" + "<div class='col-sm-4'>" + "Account Closed" + "</div></div>");
            }
            }
            //Users
            , success: function (data) {
                if (!data.stream) {
                    //if user offline this secondary Ajax function is used for channels/user.
                    $.ajax({
                        url: 'https://api.twitch.tv/kraken/channels/' + user
                        , dataType: "json"
                        , headers: {
                            'Client-ID': 'm46x2vr2wd9fzaoierocnmztlbhtsuo'
                        }
                      
                      //Check Account Closed
            , statusCode: {
                404: function (xhr) {
    console.log(user + " has no account");             
         logo = 'https://konikodes.com/fcc/img/nologo.png';
	 $(".noaccount").prepend("<div class ='row'>" + "<div class='col-sm-4'>" +
    "<img src='" + nopersonlogo + "'>" + "</div>" + "<div class='col-sm-4'>" + user + "</div>" + "<div class='col-sm-4'>" + "Account Closed" + "</div></div>");
            }
            }            
                        , success: function (data) {
                            //User Offline
                          var logo = data.logo;
						  // User Offline
						   if (logo === null){
                           logo = nologo;
}
    	$(".offline").prepend("<div class ='row'>" + "<div class='col-sm-4'>" + "<img src='" + logo + "'>"  +  "</div>" + "<div class='col-sm-4'>" + user + "</div>" + "<div class='col-sm-4'>" + "is currently Offline" + "</div></div>");     
},
 }); 
}
                //User OnLine
           else {
          if (data.stream) {
          var name = data.stream.channel.display_name;
          var logo = data.stream.channel.logo;
          var stream = data.stream.game;
          var status = data.stream.channel.status;
         $(".online").prepend("<div class ='row'>" + "<div class='col-sm-2'>" + "<img src='" + logo + "'>" + "</div>" + "<div class='col-sm-3'>" + name + "</div>" + "<div class='col-sm-7'>" + status + "</div></div>");
}

                }
            }
        });
    } 
    getStatus();
}; // 

$(document).ready(function () {
    for (i = 0; i < names.length; i++) {
                getData(names[i]);

    };
});
}
});

   // Show Buttons
   
$("#showOn").click(function(){
    $(".offline").hide();
	$(".noaccount").hide();
	$(".online").show();
})
$("#showOff").click(function(){
    $(".online").hide();
	$(".noaccount").hide();
	$(".offline").show();
})
$("#showAll").click(function(){
    $(".online").show();
	$(".offline").show();
	$(".noaccount").show();
});
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console