User:Samwilson/PagelistOnEditForm.js

( function ( mw, $ ) {

if ( mw.config.get( 'wgCanonicalNamespace' ) === 'Page'		&& ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' )	) { const indexLink = mw.config.get( 'wgServer' ) + $( '#ca-proofreadPageIndexLink a' ).attr( 'href' ), $pagelistDiv = $( ' ' ); console.log(indexLink); $pagelistDiv.load( indexLink + ' div.index-pagelist', function {			console.log($pagelistDiv);			$( '.mw-editTools' ).before( $pagelistDiv );		} ); }

}( mediaWiki, jQuery ) );