diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /extensions/WikiEditor/modules/jquery.wikiEditor.publish.js | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'extensions/WikiEditor/modules/jquery.wikiEditor.publish.js')
-rw-r--r-- | extensions/WikiEditor/modules/jquery.wikiEditor.publish.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js b/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js index c7360006..bbd539f4 100644 --- a/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js +++ b/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js @@ -72,22 +72,24 @@ fn: { } ); /* REALLY DIRTY HACK! */ - // Reformat the copyright warning stuff - var copyWarnHTML = $( '#editpage-copywarn p' ).html(); - // TODO: internationalize by splitting on other characters that end statements - var copyWarnStatements = copyWarnHTML.split( '. ' ); - var newCopyWarnHTML = '<ul>'; - for ( i = 0; i < copyWarnStatements.length; i++ ) { - if ( copyWarnStatements[i] !== '' ) { - var copyWarnStatement = $.trim( copyWarnStatements[i] ).replace( /\.*$/, '' ); - newCopyWarnHTML += '<li>' + copyWarnStatement + '.</li>'; + // Reformat the copyright warning stuff, if available + if ( $( '#editpage-copywarn p' ).length ) { + var copyWarnHTML = $( '#editpage-copywarn p' ).html(); + // TODO: internationalize by splitting on other characters that end statements + var copyWarnStatements = copyWarnHTML.split( '. ' ); + var newCopyWarnHTML = '<ul>'; + for ( i = 0; i < copyWarnStatements.length; i++ ) { + if ( copyWarnStatements[i] !== '' ) { + var copyWarnStatement = $.trim( copyWarnStatements[i] ).replace( /\.*$/, '' ); + newCopyWarnHTML += '<li>' + copyWarnStatement + '.</li>'; + } } + newCopyWarnHTML += '</ul>'; + // No list if there's only one element + $( this ).find( '.wikiEditor-publish-dialog-copywarn' ).html( + copyWarnStatements.length > 1 ? newCopyWarnHTML : copyWarnHTML + ); } - newCopyWarnHTML += '</ul>'; - // No list if there's only one element - $( this ).find( '.wikiEditor-publish-dialog-copywarn' ).html( - copyWarnStatements.length > 1 ? newCopyWarnHTML : copyWarnHTML - ); /* END OF REALLY DIRTY HACK */ if ( $( '#wpMinoredit' ).length === 0 ) { |