JS init changes. fixes #2077

git-svn-id: https://develop.svn.wordpress.org/trunk@3306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-14 06:27:30 +00:00
parent 8e9acf0511
commit 75e382c0e4
2 changed files with 6 additions and 6 deletions

View File

@ -8,6 +8,6 @@
</div> </div>
<?php check_for_pings(); ?> <?php check_for_pings(); ?>
<?php do_action('admin_footer', ''); ?> <?php do_action('admin_footer', ''); ?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body> </body>
</html> </html>

View File

@ -13,11 +13,11 @@ if (!isset($_GET["page"])) require_once('admin.php'); ?>
//<![CDATA[ //<![CDATA[
function addLoadEvent(func) { function addLoadEvent(func) {
var oldonload = window.onload; if ( typeof wpOnload != 'function' ) {
if (typeof window.onload != 'function') { wpOnload = func;
window.onload = func;
} else { } else {
window.onload = function() { var oldonload = wpOnload;
wpOnload = function() {
oldonload(); oldonload();
func(); func();
} }