From: Tom Gilder Date: Sun, 23 Oct 2005 23:59:48 +0000 (+0000) Subject: Run onload functions after content has loaded, not when onload fires (otherwise can... X-Git-Tag: 1.6.0~1341 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=b9ee309a8361652c9efacd2500f6ecbfa93c2b64;p=lhc%2Fweb%2Fwiklou.git Run onload functions after content has loaded, not when onload fires (otherwise can take ages due to images) --- diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 018ef9a198..3eab60c611 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -227,6 +227,7 @@ class MonoBookTemplate extends QuickTemplate { data['tagline']) { ?>
  • data['tagline'] ?>
  • + html('reporttime') ?> diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 8773df98b3..bfb3ec1437 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -12,13 +12,17 @@ if (clientPC.indexOf('opera')!=-1) { } // add any onload functions in this hook (please don't hard-code any events in the xhtml source) + +var doneOnloadHook; + function onloadhook () { // don't run anything below this for non-dom browsers - if(!(document.getElementById && document.getElementsByTagName)) return; + if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) return; histrowinit(); unhidetzbutton(); tabbedprefs(); akeytt(); + doneOnloadHook = true; } if (window.addEventListener) window.addEventListener("load",onloadhook,false); else if (window.attachEvent) window.attachEvent("onload",onloadhook);