ProofreadPage has custom editforms for Index pages, which are not
supported by the API. These editforms have no #wpTextbox1, so disable
live preview in that case.
Bug: T78709
Change-Id: I90cba79e5a4a756454741c4070ebdf620520ab55
$( 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;
}