includes/clientside/static/loader.js
author Dan
Fri, 18 Dec 2009 19:06:49 -0500
changeset 1175 1e2c9819ede3
parent 588 20484deb89cd
child 1227 bdac73ed481e
permissions -rw-r--r--
Logs: Fully integrated an author_uid column. Logs are now linked by user ID instead of just username, so they survive username changes better. Database is changed. Fixes issue 6.

// Some final stuff - loader routines, etc.

var onload_complete = false;

function mdgInnerLoader(e)
{
  window.onkeydown = isKeyPressed;
  window.onkeyup = function(e) { isKeyPressed(e); };
  
  if ( typeof(dbx_set_key) == 'function')
  {
    dbx_set_key();
  }
  
  runOnloadHooks(e);
}

// Enano's main init function.
function enano_init(e)
{
  mdgInnerLoader(e);
  
  // we're loaded; set flags to true
  console.info('Enano::JS runtime: system init complete');
  onload_complete = true;
}

// don't init the page if less than IE6
if ( typeof(KILL_SWITCH) == 'boolean' && !KILL_SWITCH )
{
  window.onload = enano_init;
}