mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Check useeditwarning preference before showing warning when browsing away from editor
Bug: 51057 Change-Id: Ic4b02372e6e08d3a0d36457457a2e2bbfbaa797d
This commit is contained in:
parent
4c0221c09c
commit
ca547a7f7c
|
@ -1569,7 +1569,7 @@ ve.init.mw.ViewPageTarget.prototype.onBeforeUnload = function () {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Check if there's been an edit
|
// 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
|
// Return our message
|
||||||
message = ve.msg( 'visualeditor-viewpage-savewarning' );
|
message = ve.msg( 'visualeditor-viewpage-savewarning' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue