mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Introduce a 'mobile-ab' config option for section editing
This enables mobile section editing if the user is logged in and has an odd user ID. Otherwise it is disabled. Bug: T218851 Change-Id: I2c22d7636ae11d2db7780ae5adb3abe9df532b7c
This commit is contained in:
parent
7e3e7e9c5a
commit
d6d48ff4b8
|
@ -55,6 +55,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
// T218851: Section editing A/B test
|
||||
if ( conf.enableVisualSectionEditing === 'mobile-ab' ) {
|
||||
if ( !mw.user.isAnon() && mw.user.getId() % 2 ) {
|
||||
conf.enableVisualSectionEditing = 'mobile';
|
||||
} else {
|
||||
conf.enableVisualSectionEditing = false;
|
||||
}
|
||||
}
|
||||
|
||||
mw.libs.ve = mw.libs.ve || {};
|
||||
|
||||
mw.libs.ve.targetLoader = {
|
||||
|
@ -134,7 +143,7 @@
|
|||
if ( sessionState ) {
|
||||
request = sessionState.request || {};
|
||||
// Check true section editing is in use
|
||||
enableVisualSectionEditing = mw.config.get( 'wgVisualEditorConfig' ).enableVisualSectionEditing;
|
||||
enableVisualSectionEditing = conf.enableVisualSectionEditing;
|
||||
section = request.mode === 'source' || enableVisualSectionEditing === true || enableVisualSectionEditing === options.targetName ?
|
||||
options.section : null;
|
||||
// Check the requested page, mode and section match the stored one
|
||||
|
|
Loading…
Reference in a new issue