$( function () {
// Do not enable on user .js/.css pages, as there's no sane way of "previewing"
// the scripts or styles without reloading the page.
- if ( $( '#mw-userjsyoucanpreview' ).length || $( '#mw-usercssyoucanpreview' ).length ) {
+ // Do not enable for ProofreadPage Index page editors, which have no textbox
+ if ( $( '#mw-userjsyoucanpreview' ).length || $( '#mw-usercssyoucanpreview' ).length || $( '#wpTextbox1' ).length === 0 ) {
return;
}
if ( !document.getElementById( 'wikiDiff' ) && document.getElementById( 'wikiPreview' ) ) {
$( '#wikiPreview' ).after(
$( '<div>' )
+ .hide()
.attr( 'id', 'wikiDiff' )
.html( '<table class="diff"><col class="diff-marker"/><col class="diff-content"/>' +
'<col class="diff-marker"/><col class="diff-content"/><tbody/></table>' )