Merge "Check useeditwarning preference before showing warning when browsing away from editor"

This commit is contained in:
jenkins-bot 2014-04-18 19:24:23 +00:00 committed by Gerrit Code Review
commit 987b10da94

View file

@ -1569,7 +1569,7 @@ ve.init.mw.ViewPageTarget.prototype.onBeforeUnload = function () {
return null;
}
// Check if there's been an edit
if ( this.surface && this.edited ) {
if ( this.surface && this.edited && mw.user.options.get( 'useeditwarning' ) ) {
// Return our message
message = ve.msg( 'visualeditor-viewpage-savewarning' );
}