JS init changes. fixes #2077
git-svn-id: http://svn.automattic.com/wordpress/trunk@3306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a2287378d
commit
47889e8cea
|
@ -8,6 +8,6 @@
|
|||
</div>
|
||||
<?php check_for_pings(); ?>
|
||||
<?php do_action('admin_footer', ''); ?>
|
||||
|
||||
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
|
||||
</body>
|
||||
</html>
|
|
@ -13,11 +13,11 @@ if (!isset($_GET["page"])) require_once('admin.php'); ?>
|
|||
//<![CDATA[
|
||||
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
if ( typeof wpOnload != 'function' ) {
|
||||
wpOnload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
var oldonload = wpOnload;
|
||||
wpOnload = function() {
|
||||
oldonload();
|
||||
func();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue