mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
Merge "Check useeditwarning preference before showing warning when browsing away from editor"
This commit is contained in:
commit
987b10da94
|
@ -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' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue