Index: proofread.js
===================================================================
--- proofread.js	(révision 112310)
+++ proofread.js	(copie de travail)
@@ -843,18 +843,18 @@
 		};
 
 		var $edit = $( '#wpTextbox1' );
-		if( typeof $edit.wikiEditor == 'function' ) {
-			setTimeout(function() {
-			$edit.wikiEditor( 'addToToolbar', {
-				'sections': {
-					'proofreadpage-tools': {
-						'type': 'toolbar',
-						'label': mw.msg( 'proofreadpage-section-tools' )
+		if( mw.user.options.get('usebetatoolbar') ) {
+			mw.loader.using('ext.wikiEditor.toolbar', function() {
+				$edit.wikiEditor( 'addToToolbar', {
+					'sections': {
+						'proofreadpage-tools': {
+							'type': 'toolbar',
+							'label': mw.msg( 'proofreadpage-section-tools' )
+						}
 					}
-				}
-			} )
-			.wikiEditor( 'addToToolbar', tools);
-			}, 500);
+				} )
+				.wikiEditor( 'addToToolbar', tools);
+			} );
 		} else {
 			var toolbar = document.getElementById( 'toolbar' );
 
@@ -896,18 +896,9 @@
 		return;
 	}
 
-	if( document.URL.indexOf( 'action=protect' ) > 0 || document.URL.indexOf( 'action=unprotect' ) > 0 ) {
+	if( $.inArray( mw.config.get( 'wgAction' ), ['protect', 'unprotect', 'delete', 'undelete', 'watch', 'unwatch', 'history'] ) !== -1 ) {
 		return;
 	}
-	if( document.URL.indexOf( 'action=delete' ) > 0 || document.URL.indexOf( 'action=undelete' ) > 0 ) {
-		return;
-	}
-	if( document.URL.indexOf( 'action=watch' ) > 0 || document.URL.indexOf( 'action=unwatch' ) > 0 ) {
-		return;
-	}
-	if( document.URL.indexOf( 'action=history' ) > 0 ) {
-		return;
-	}
 
 	/* check if external URL is provided */
 	if( !self.proofreadPageThumbURL ) {
