Merge "Fix more UnitTests for databases that do not use integer timestamps"
[lhc/web/wiklou.git] / resources / mediawiki.action / mediawiki.action.view.postEdit.js
1 ( function ( mw, $ ) {
2 // Only a view can be a post-edit.
3 if ( mw.config.get( 'wgAction' ) !== 'view' ) {
4 return;
5 }
6
7 // Matches EditPage::POST_EDIT_COOKIE_KEY_PREFIX
8 var cookieKey = mw.config.get( 'wgCookiePrefix' ) + 'PostEditRevision' + mw.config.get( 'wgCurRevisionId' );
9
10 if ( $.cookie( cookieKey ) === '1' ) {
11 // We just saved this page
12 $.cookie( cookieKey, null, { path: '/' } );
13 mw.config.set( 'wgPostEdit', true );
14 }
15 } ( mediaWiki, jQuery ) );