OrbiterMicro Chat with Log

by union

HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Union Chat with Log, For JavaScript (OrbiterMicro)</title>

<!--CSS-->
<style type="text/css">
#chatPane {
  border: inset 2px; 
  height: 100px; 
  width: 600px; 
  overflow: auto; 
  padding: 5px; 
  margin-bottom: 5px
}
  
#logPane {
  border: inset 2px; 
  height: 200px; 
  width: 600px; 
  overflow:auto; 
  padding: 5px; 
  font-family:monospace;
  white-space: nowrap;
}
</style>

<!--Load the OrbiterMicro JavaScript library (non-minified version). Use during development.-->
<script type="text/javascript" src="http://unionplatform.com/cdn/OrbiterMicro_latest.js"></script>
<!--Load the OrbiterMicro JavaScript library (minified version). Use for production.-->
<!--<script type="text/javascript" src="http://unionplatform.com/cdn/OrbiterMicro_latest_min.js"></script>-->

<!--Chat code-->
<script type="text/javascript">
//==============================================================================
// VARIABLES
//==============================================================================
var orbiter;
var msgManager;
var UPC = net.user1.orbiter.UPC;
var roomID = "chatRoom";

//==============================================================================
// INITIALIZATION
//==============================================================================
function init () {
  // Create the Orbiter instance, used to connect to and communicate with Union
  orbiter = new net.user1.orbiter.Orbiter();

  // Set up the debugging log
  displayLogHistory();
  orbiter.getLog().setLevel(net.user1.logger.Logger.DEBUG);
  orbiter.enableConsole();
  orbiter.getLog().addEventListener(net.user1.logger.LogEvent.UPDATE, logUpdateListener, this);
  
  // If required JavaScript capabilities are missing, abort
  if (!orbiter.getSystem().isJavaScriptCompatible()) {
    displayChatMessage("Your browser is not supported.");
   ...