--- a/includes/template.php Wed Jul 29 10:47:26 2009 -0400
+++ b/includes/template.php Wed Jul 29 10:48:43 2009 -0400
@@ -22,6 +22,7 @@
var $page_id = false;
var $namespace = false;
var $js_preload = array();
+ var $js_append = '';
/**
* Page action conditions
@@ -470,6 +471,16 @@
}
/**
+ * Queue some HTML to be inserted after the Javascript runtime.
+ * @param string HTML glob
+ */
+
+ function add_header_js($html)
+ {
+ $this->js_append .= "$html\n ";
+ }
+
+ /**
* Global, only-called-once init. Goes to all themes.
*/
@@ -557,6 +568,7 @@
window.onload = function(e) { };
}
</script>
+ $this->js_append
JSEOF;
}
else
@@ -604,6 +616,7 @@
window.onload = function(e) { };
}
//]]></script>
+ $this->js_append
JSEOF;
}