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

              
                <head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
</head>


<body>
 
<div class="container-fluid wrapper">
   <div class="col-md-8 col-md-offset-2  text-center">
  <!--TITLE-->
  <div class="row pageTitle">
          <h1>TWITCH.TV STREAMERS </h1>
      </div>
  </div>
  </div>
  
  
  
  <div  class="container-fluid col-md-8 col-md-offset-2  text-center second ">
    <div  class="container-fluid  text-center first">
      <div class="col-md-2"  > 
        <img src="https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-profile_image-d9514f2df0962329-300x300.png"height="42" width="42">
      </div>
      <div class="col-md-3">
        <h1>freecodecamp</h1>
      </div>
     <div id="fccstream" >
      </div>       
      
      </div>
      
    
    <div id="display-result">
    </div>
   
      </div>
 </div>
 </div>



<body>

              
            
!

CSS

              
                body {
  font-family: Helvetica Neue, Helvetica, Arimo, Liberation Sans, Lucida Grande, sans-serif;
  background-color:#454545;
  no-repeat center center fixed;
}

.first{font-size: 5rem;
  background-color:blue;
  text-color:red;
  border:solid;
  border-width: 2px;
  border-color:white;
  margin-top: auto;
}
.second{
  margin-top: -330px;
}
h1,
h2,
h3,
h4 {
  font-family: Times, Georgia, Linux Libertine, Cambria, serif;
}

h4 a,
.list-inline li a {
  color: white !important;
  text-decoration: underline !important;
}

a:hover,
a:visited,
a:active,
a:link {
  text-decoration: none;
  color: #333;
}

.pageTitle,
.titleNote {
  background-color: rgba(12, 33, 38, 0.5);
  color: white;
}

.search_box,
.searchSubmit,
#randomPage {
  height: 4rem;
  min-height: 1.2em;
  line-height: 1.6rem;
  verticle-align: middle;
  display: inline-block;
  margin: 2.2rem auto 1.5em;
  padding: .5rem 1rem;
}

.search_box {
  font-size: 2rem;
  width: 400px;
  background: #fff;
  border: .5px solid #ccc;
  box-shadow: inset 0 0 0 .1em #ccc;
  border-radius: .1em;
}

.searchSubmit,
#randomPage {
  font-weight: 70;
  color: #fff;
  cursor: pointer;
  background-color: #165c91;
  border: 1px solid #165c91;
  text-align: center;
}

#randomPage a {
  color: #fff;
}
/* RESULTS */

.resultDisplay {
  
}

.results {
  font-size: 2rem;
  max-width: 800px;
  background: #fff;
  border: .5px solid #ccc;
  box-shadow: inset 0 0 0 .1em #ccc;
  border-radius: .1em;
  padding: 1rem;
  margin: .2rem;
}


.extract {
  font-size: 12px;
}


/* Sticky Footer
http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ */

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

.wrapper {
  min-height: 100%; 
  height: auto !important; /*Cause footer to stick to bottom in IE 6*/
  height: 100%; 
  margin: 0 auto -4em ; /*Allow for footer height*/

}

.footer,
.push {
  clear: both;
}

.footer {
  min-height: 4em;
  background-color: rgba(12, 33, 38, 0.5);
}

.footer-menu-divider,
.copyright {
  color: white;
}

              
            
!

JS

              
                
var apiURL="https://wind-bow.gomix.me/twitch-api/streams/";
var usernames=[  "cretetion",  "storbeck", "habathcx", "RobotCaleb","ESL_SC2", "noobs2ninjas","gamesdonequick","noizeeh"];


 $.getJSON("https://wind-bow.gomix.me/twitch-api/streams/freecodecamp",function(data1){
   var stream1=data1.stream;
    function onOff1(){
     
    if(stream1==null){
      return("Offline");
    }
    else{
      return("Online");
    }
      
  }
   function fccstr(){
     if(stream1==null){
       $('#fccstream').append("<h2>Offline</h2>")
    }
    else{
      $('#fccstream').append("<h2>"+data1.stream.game+"</h2>")
    }
     
  } console.log(fccstr());   
 })


for(i=0;i<usernames.length;i++)
{
  var finalURL=apiURL+usernames[i]+'/';

  
$.getJSON(finalURL,function(data){
          
  var icon=data.stream.channel.logo;  //gooooood
  var name=data.stream.channel.name; //gooooood
console.log(name);
  console.log(icon);
  var stream=data.stream
  
  function onOff(stream){
    
    if(stream=null){
      return("Offline");
    }
    else{
      return("online");
    }
  }
  
  var stream=data.stream;
  
  
  
   $('#display-result').append("<div class=\"container-fluid  text-center first\"><div class=\"col-md-2\"><img src="+ icon +" height=\"42\" width=\"42\"></div><div class=\"col-md-3\"><h1>"+name+"</h1></div><h2>"+data.stream.game+"</h2>")
  

     


     })}


          

              
            
!
999px

Console