diff --git a/extension.json b/extension.json index aa8da5d3..b992d1a3 100644 --- a/extension.json +++ b/extension.json @@ -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.", diff --git a/includes/Hooks.php b/includes/Hooks.php index e4920b2a..f2bc6bcf 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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', + ]; } } diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index e3635d5c..7d156655 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -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' ); } diff --git a/resources/modules/ve-cm/ve.ui.CodeMirrorAction.js b/resources/modules/ve-cm/ve.ui.CodeMirrorAction.js index c031d591..ebd3b3dd 100644 --- a/resources/modules/ve-cm/ve.ui.CodeMirrorAction.js +++ b/resources/modules/ve-cm/ve.ui.CodeMirrorAction.js @@ -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' ); }