mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-28 01:30:05 +00:00
6e379107c3
Bug: T185279 Depends-On: I3678996bcf644cc889dd168ac3ce48b5c3633ec1 Change-Id: I31a21e10b3fcd88fbce6881475f02a9d37df39c2
17 lines
530 B
JavaScript
17 lines
530 B
JavaScript
( function ( mw, $ ) {
|
|
$( function () {
|
|
var location = mw.config.get( 'wgLinterErrorLocation' ),
|
|
$textbox = $( '#wpTextbox1' );
|
|
|
|
if ( location ) {
|
|
if ( $textbox.length ) {
|
|
$textbox.focus().textSelection( 'setSelection', { start: location[ 0 ], end: location[ 1 ] } );
|
|
}
|
|
mw.hook( 've.tempWikitextReady' ).add( function () {
|
|
mw.libs.ve.tempWikitextEditor.$element[ 0 ].setSelectionRange( location[ 0 ], location[ 1 ] );
|
|
mw.libs.ve.tempWikitextEditor.focus();
|
|
} );
|
|
}
|
|
} );
|
|
}( mediaWiki, jQuery ) );
|