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.

<link rel="stylesheet" href="//" media="screen" title="no title" charset="utf-8">
<link href="//" rel="stylesheet" media="screen" title="no title" charset="utf-8">
<script src="//"></script> 
<script src="//"></script>  

<body style="background: rgb(78, 163, 153);" >
   <div id="name" class="container" style="background: #fbd860;">
   <h3 class="text-center">Firebase Live Board </h3>
   <div id="innerbase" class="jumbotron">
      <label>To-Do Item</label>
      <input type="text" id="firetextbox" class="form-control" /> <br/>
      <button id="sync" class="btn btn-success">Sync to Firebase</button>
      <button id="clearbutton" class="btn btn-warning">Clear List</button>
      <button id="purgeDatabase" class="btn btn-danger">Purge Database</button>
   <div id="listItem" class="text-center jumbotron background: rgb(8, 13, 15);">
<script src="./firebase.js" > </script> 
              //Imported firebase.js through cdn 
//Javascript code will go here
// Created by - Harshit Pandey
// Read more -
//Create firebase instance to database

var firebutton = document.getElementById('sync');
var firetext = document.getElementById('firetextbox');
var itemList = document.getElementById('listItem');
var purgeButton = document.getElementById('purgeDatabase');
var clear = document.getElementById('clearbutton');
//Create dataReference to Firebase and henceforth Data Dictionary
var dataRef = new Firebase('');
var itemRef = dataRef.child('Items');

purgeButton.addEventListener('click', function() {
    else { alert('Database is already purged, insert a new item');}

clear.addEventListener('click', function(){
//Lets create some events handlers
firebutton.addEventListener('click', function() {
    //caputure the text from the textbox
    //user firebase Reference to sync to Firebase
        item: firetext.value
    //set textbox to blank 
    firetext.value = '';

function drawTable()
var elem = document.getElementById('firebaseTable');

if ($('#elemId').length!==0)

var theTable = "<table id=\"firebaseTable\" class=\"";
theTable += "table table-striped table-hover \" ><tbody>";
var tableContent = theTable;
itemRef.on("value", function(snapshot) {
    var newPost = snapshot.val();
    $.each(newPost, function(index) {
        tableContent += "<tr class=\"success\">";
        tableContent +=
            "<td class=active>" + newPost[index].item + "</td>";
        tableContent += "</tr>";
    tableContent += '</tbody></table>';


🕑 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.