https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113461
Revision: 113461
Author: zaran
Date: 2012-03-09 09:33:14 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
Bug 34737 - Patch from ThomasPT (Tpt)
Modified Paths:
--------------
trunk/extensions/ProofreadPage/proofread.js
Modified: trunk/extensions/ProofreadPage/proofread.js
===================================================================
--- trunk/extensions/ProofreadPage/proofread.js 2012-03-09 09:10:35 UTC (rev
113460)
+++ trunk/extensions/ProofreadPage/proofread.js 2012-03-09 09:33:14 UTC (rev
113461)
@@ -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 ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs