From d93eaf3efaa79c55a59004da47ad65247d4a0b57 Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Sat, 17 Oct 2009 20:22:34 +0000 Subject: [PATCH] * fixes old toolbar usage where $j.wikiEditor is defined --- js2/editPage.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js2/editPage.js b/js2/editPage.js index 1c0d1e0cb7..7775dc0f94 100644 --- a/js2/editPage.js +++ b/js2/editPage.js @@ -38,14 +38,15 @@ js2AddOnloadHook( function() { } } ); - }else{ - //add to the old-toolbar - if( $j('#btn-add-media-wiz').length == 0 ){ + } + //add to old toolbar if wikiEditor did not remove '#toolbar' from the page: + setTimeout(function(){ + if( $j('#btn-add-media-wiz').length == 0 && $j( '#toolbar' ).length != 0 ){ $j( '#toolbar' ).append( '' ); $j( '#btn-add-media-wiz' ).addMediaWiz( amwConf ); } - } + },100) }); -- 2.20.1