Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple, plugin-free chat room - build with Firebase
<script src=""></script>
<ul id="chat-list">
<input type="text" id="msg"/>
<input type="button" id="send" value="Send"/>
var ref = new Firebase("").limit(5);
ref.on("child_added", function(snap) {
var chatItem = document.createElement("li");
chatItem.innerHTML = JSON.stringify(snap.val()); =;
ref.on("child_removed", function(snap) {
var item = document.getElementById(;
document.getElementById("send").onclick = function() {
var msg = document.getElementById("msg").value;
Copy link

garbearlez commented Nov 20, 2017

is there a way to make a login for this, so that if you have more than 3 people, you can tell who it is?

Copy link

caracoline commented Jan 25, 2018

thanks u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment