mediawiki-extensions-Linter/modules/ext.linter.edit.js
Kunal Mehta bce5b31616 Initial commit
This configures a MediaWiki extension to recieve Parsoid's lint errors
and expose them to users.

Change-Id: Ie0776aecf145eb1c87c2a539ddf3ea8d35a899f5
2016-10-17 16:02:53 -07:00

9 lines
265 B
JavaScript

( function ( mw, $ ) {
$( function () {
var location = mw.config.get( 'wgLinterErrorLocation' );
if ( location ) {
$( '#wpTextbox1' ).focus().textSelection( 'setSelection', { start: location[ 0 ], end: location[ 1 ] } );
}
} );
}( mediaWiki, jQuery ) );