2016-10-13 08:14:18 +00:00
|
|
|
( function ( mw, $ ) {
|
|
|
|
$( function () {
|
2017-03-10 22:09:17 +00:00
|
|
|
var location = mw.config.get( 'wgLinterErrorLocation' ),
|
|
|
|
$textbox = $( '#wpTextbox1' );
|
|
|
|
|
2016-10-13 08:14:18 +00:00
|
|
|
if ( location ) {
|
2017-03-10 22:09:17 +00:00
|
|
|
if ( $textbox.length ) {
|
|
|
|
$textbox.focus().textSelection( 'setSelection', { start: location[ 0 ], end: location[ 1 ] } );
|
|
|
|
}
|
2018-01-22 18:26:12 +00:00
|
|
|
mw.hook( 've.tempWikitextReady' ).add( function () {
|
|
|
|
mw.libs.ve.tempWikitextEditor.$element[ 0 ].setSelectionRange( location[ 0 ], location[ 1 ] );
|
|
|
|
mw.libs.ve.tempWikitextEditor.focus();
|
2017-03-10 22:09:17 +00:00
|
|
|
} );
|
2016-10-13 08:14:18 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
}( mediaWiki, jQuery ) );
|