Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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.


                <div class="container">
  <div class="panel-default panel">
  <div class="panel-heading">
    <h1>Twitch Streamers</h1>
    <div class="pull-right">
        <input type="text" name="searchChannel" id="searchChannel" placeholder="Search..."/>
      <li id="showAll" class="btn-default activeBorder" title="Show All">All</li>
      <li id="showOnline" class="btn-success"><i class="glyphicon glyphicon-eye-open" title="Online"></i></li>
      <li id="showOffline" class="btn-warning"><i class="glyphicon glyphicon-eye-close" title="Offline"></i></li>

  <div class="flex" id="displayBox">



  overflow: auto;
  transition: all .25s ease-in-out;
  margin: 2% auto auto auto;
  background: url("");
  margin: 0;
  float: left;
.panel-heading ul{
  list-style: none;
  margin: 0;
  padding: 0;
.panel-heading ul li{
  display: inline-block;
  height: 2em;
  width: 50px;
  text-align: center;
  line-height: 2em;
  font-size: 1.25em;
  cursor: pointer;
  border: 2px transparent solid;
  border-radius: 10px;
.panel-heading ul li.activeBorder{
  border: 2px #000 solid;
  display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
  min-height: 200px;

#displayBox img{
  border-radius: 50px;
  max-width: 50px;
#displayBox .channelBox{
  overflow: auto;
  margin: 5px auto;
  padding: 5px;
  height: 175px;
  width: 300px;
  float: left;
  box-sizing: content-box;
  margin: 5px;
#displayBox .channelBox img{
  margin: 2px 10px 2px 5px;
  float: left;
#displayBox .channelBox .banner{
  display: block;
  height: 100px;
  width: 100%;
  margin-bottom: 5px;
#displayBox .channelBox .status{
  text-transform: uppercase;
  margin-top: 5px;
  background-color: rgb(76, 174, 76);
  color: #fff;
  font-weight: bold;
  float: left;
  color: #999; 


                var streams = [

function getChannelInfo(type, name) {
  return "" + type + "/" + name;

function loadDefault(list) {

  list.forEach(function(channel) {
    var game, status;
    // determine whether or not the channel is streaming
    $.getJSON(getChannelInfo("streams", channel), function(streamData) {
      //console.log("Checking " + + " for " + channel);
      //console.debug( === null);
      if ( === null) {
        game = "Offline";
        status = "warning";
      } else if ( === undefined) {
        game = "Account Closed";
        status = "danger";
      } else {
        game = "Playing: <strong>""</strong>";
        status = "success";
      //console.log("Displaying "+ channel + " as "+ game);

      // display channel information
      $.getJSON(getChannelInfo("channels", channel), function(infoData) {
        var img = infoData.logo != null ? infoData.logo : "";
        var url = infoData.url;
        var banner = infoData.profile_banner != null ? infoData.profile_banner : "";
        var followers = infoData.followers;
        var display_name = infoData.display_name != null ? infoData.display_name : channel;

          showChannel(status, banner, channel, display_name, img, game, url)

function showChannel(status, banner, channel, display_name, img, game, url) {
    var channelBox = '<div class="panel animated fadeInUp channelBox"><div class="alert-'+status+'">' +
    '<a href="'+url+'" target="_blank">' +
    '<div class="banner" style="background: url(\''+banner+'\'); background-size: cover;"></div>'+
    '<div><img src="'+img+'" alt="'+channel +'">' +
    display_name + "<div class=\"small gray\">" +game + "</div>" +
    if (status == "success")
      channelBox += '<div class="status small text-center">Online Now</div>';
    channelBox += "</div></div>"
  return (channelBox);

function makeActive(box){
     $('.panel-heading ul li').removeClass("activeBorder");

$('#showAll').on('click', function(){
    $('.channelBox .alert-warning').parent().fadeIn();
    $('.channelBox .alert-success').parent().fadeIn();
  $('#showOnline').on('click', function(){
    $('.channelBox .alert-warning').parent().fadeOut();
    $('.channelBox .alert-success').parent().fadeIn();
  $('#showOffline').on('click', function(){
    $('.channelBox .alert-success').parent().fadeOut();
    $('.channelBox .alert-warning').parent().fadeIn();
  $("form").on('submit', function(){
  // Thanks
  function debounce(fn, duration) {
  var timer;
  return function(){
    timer = setTimeout(fn, duration);
  $('#searchChannel').on('keyup', debounce(function(){
    var term = $('#searchChannel').val();

    if (term.length > 0){
      // search through our users and re-load
      var results = "";
      results = streams.filter(function(s){
        return s.toLowerCase().indexOf(term.toLowerCase()) > -1;
      console.log("Results: "+results);
    } else {
  }, 500));

$(function() {