895cb0378340f3516b373f4fb5e5c15920677e42
2 * Scripts for pre-emptive edit preparing on action=edit
6 var api
= new mw
.Api(), pending
= null, $form
= $( '#editform' );
8 function stashEdit( token
) {
9 var data
= $form
.serializeObject();
14 title
: mw
.config
.get( 'wgPageName' ),
15 section
: data
.wpSection
,
16 sectiontitle
: data
.wpSection
=== 'new' ? data
.wpSummary
: '',
17 text
: data
.wpTextbox1
,
18 contentmodel
: data
.model
,
19 contentformat
: data
.format
,
20 baserevid
: data
.parentRevId
24 $form
.on( 'change', function () {
28 api
.getToken( 'edit' ).then( stashEdit
);
31 }( mediaWiki
, jQuery
) );