// ikiwiki's javascript utility function library
var hooks;
+
+// Run onload as soon as the DOM is ready, if possible.
+// gecko, opera 9
+if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", run_hooks_onload, false);
+}
+// other browsers
window.onload = run_hooks_onload;
+var onload_done = 0;
+
function run_hooks_onload() {
+ // avoid firing twice
+ if (onload_done)
+ return;
+ onload_done = true;
+
run_hooks("onload");
}