mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
5014e122e3
Experimental to avoid making toolbar too long Bug: 51610 Change-Id: I1eb5b1361d6058a6e1533ab62c0aa7e21c9fc090
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface StrikethroughButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* UserInterface code button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.AnnotationButtonTool
|
|
* @constructor
|
|
* @param {ve.ui.SurfaceToolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.StrikethroughButtonTool = function VeUiStrikethroughButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.AnnotationButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.StrikethroughButtonTool, ve.ui.AnnotationButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.StrikethroughButtonTool.static.name = 'strikethrough';
|
|
|
|
ve.ui.StrikethroughButtonTool.static.icon = {
|
|
'default': 'strikethrough-a',
|
|
'en': 'strikethrough-s'
|
|
};
|
|
|
|
ve.ui.StrikethroughButtonTool.static.titleMessage = 'visualeditor-annotationbutton-strikethrough-tooltip';
|
|
|
|
ve.ui.StrikethroughButtonTool.static.annotation = { 'name': 'textStyle/strike' };
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'strikethrough', ve.ui.StrikethroughButtonTool );
|
|
|
|
ve.ui.commandRegistry.register( 'strikethrough', 'annotation', 'toggle', 'textStyle/strike' );
|