mediawiki-extensions-Math/modules/ext.math.editbutton.js
Moritz Schubotz 9f7a1e51c4 Editbutton for math
Move the code that creates the Editbutton for math from core,
where it is removed in Ib17aa47c7d647e1ed293541adbdd1aa77e25e59e.

Imported button image from:
ssh://gerrit.wikimedia.org:29418/mediawiki/core.git/skins/common/button_math.png

We don't need to vary the icon per language, because there is not a
single language that has a non default icon.

Bug: 60471
Change-Id: I3d126c1c252c27fa65ab8fb42ffab66a2d99cfa8
2014-04-07 09:26:16 +00:00

14 lines
371 B
JavaScript

( function ( mw ) {
if ( mw.toolbar ) {
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
mw.toolbar.addButton( {
imageFile: iconPath + 'button_math.png',
speedTip: mw.msg( 'math_tip' ),
tagOpen: '<math>',
tagClose: '</math>',
sampleText: mw.msg( 'math_sample' ),
imageId: 'mw-editbutton-math'
} );
}
} ( mediaWiki ) );