mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Remove $wgCodeMirrorColorblindColors feature flag
Bug: T307188 Change-Id: I7a8f2b02cad160df838ebfb167b63296123b4a08
This commit is contained in:
parent
9f34c4d220
commit
574ceba9bf
|
@ -15,11 +15,6 @@
|
|||
"MediaWiki": ">= 1.38.0"
|
||||
},
|
||||
"config": {
|
||||
"CodeMirrorColorblindColors": {
|
||||
"value": false,
|
||||
"description": "Temporary feature flag for colorblind-friendly colors.",
|
||||
"public": true
|
||||
},
|
||||
"CodeMirrorLineNumberingNamespaces": {
|
||||
"value": null,
|
||||
"description": "List of namespace IDs where line numbering should be enabled, or `null` to enable for all namespaces. Set to [] to disable everywhere. Defaults to `null` for all namespaces.",
|
||||
|
|
|
@ -64,8 +64,6 @@ class Hooks {
|
|||
/** @var Config $config */
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
|
||||
$vars['wgCodeMirrorColorblindColors'] = $config->get( 'CodeMirrorColorblindColors' );
|
||||
|
||||
$vars['wgCodeMirrorLineNumberingNamespaces'] = $config->get( 'CodeMirrorLineNumberingNamespaces' );
|
||||
}
|
||||
|
||||
|
@ -84,15 +82,12 @@ class Hooks {
|
|||
'type' => 'api',
|
||||
];
|
||||
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
if ( $config->get( 'CodeMirrorColorblindColors' ) ) {
|
||||
$defaultPreferences['usecodemirror-colorblind'] = [
|
||||
'type' => 'toggle',
|
||||
'label-message' => 'codemirror-prefs-colorblind',
|
||||
'help-message' => 'codemirror-prefs-colorblind-help',
|
||||
'section' => 'editing/accessibility',
|
||||
];
|
||||
}
|
||||
$defaultPreferences['usecodemirror-colorblind'] = [
|
||||
'type' => 'toggle',
|
||||
'label-message' => 'codemirror-prefs-colorblind',
|
||||
'help-message' => 'codemirror-prefs-colorblind-help',
|
||||
'section' => 'editing/accessibility',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
// T194102: UniversalLanguageSelector integration is buggy, disabling it completely
|
||||
.addClass( 'noime' );
|
||||
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
if ( mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
$codeMirror.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) {
|
|||
// so revert any editfont user preference
|
||||
surfaceView.$element.removeClass( 'mw-editfont-sans-serif mw-editfont-serif' ).addClass( 'mw-editfont-monospace' );
|
||||
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
if ( mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
surfaceView.$element.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue