2 // Only a view can be a post-edit.
3 if ( mw.config.get( 'wgAction' ) !== 'view' ) {
7 // Matches EditPage::POST_EDIT_COOKIE_KEY_PREFIX
8 var cookieKey = mw.config.get( 'wgCookiePrefix' ) + 'PostEditRevision' + mw.config.get( 'wgCurRevisionId' );
10 if ( $.cookie( cookieKey ) === '1' ) {
11 // We just saved this page
12 $.cookie( cookieKey, null, { path: '/' } );
13 mw.config.set( 'wgPostEdit', true );
15 } ( mediaWiki, jQuery ) );