2 * Scripts for action=edit
7 var editBox
, scrollTop
, $editForm
;
9 // Make sure edit summary does not exceed byte limit
10 $( '#wpSummary' ).byteLimit( 255 );
12 // Restore the edit box scroll state following a preview operation,
13 // and set up a form submission handler to remember this state.
14 editBox
= document
.getElementById( 'wpTextbox1' );
15 scrollTop
= document
.getElementById( 'wpScrolltop' );
16 $editForm
= $( '#editform' );
17 if ( $editForm
.length
&& editBox
&& scrollTop
) {
18 if ( scrollTop
.value
) {
19 editBox
.scrollTop
= scrollTop
.value
;
21 $editForm
.submit( function () {
22 scrollTop
.value
= editBox
.scrollTop
;
27 }( mediaWiki
, jQuery
) );