diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /extensions/WikiEditor/modules/jquery.wikiEditor.publish.js | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
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 ) { |