includes/clientside/static/loader.js
author Dan
Wed, 02 Jul 2008 19:36:44 -0400
changeset 592 27377179fe58
parent 588 20484deb89cd
child 1227 bdac73ed481e
permissions -rw-r--r--
Another sweep from the optimization monster. template: rewrote parts of tplWikiFormat to do faster validation and less eval()ing template: sidebar is now cached for anonymous users (thanks to Richard Greene for the suggestion) dbal: rewrote SQL query parser, much cruft taken out template: made tplWikiFormat depend more on RenderMan common: moved some lesser-used includes out of main loading sequence Expect a lot of changes to AES code in the next commit!

// 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;
}