jenkins-bot has submitted this change and it was merged.
Change subject: Add dependency on mediawiki.toolbar
......................................................................
Add dependency on mediawiki.toolbar
Follows-up Ibcda91bbb164b0.
ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface
used to be part of mediawiki.action.edit but is now in its own module.
Bug: T86235
Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c
---
M Math.php
M modules/ext.math.editbutton.js
2 files changed, 12 insertions(+), 13 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Math.php b/Math.php
index ad4390b..083c477 100644
--- a/Math.php
+++ b/Math.php
@@ -496,9 +496,6 @@
$wgResourceModules['ext.math.editbutton.enabler'] = array(
'scripts' => 'ext.math.editbutton.js',
- 'dependencies' => array(
- 'mediawiki.action.edit',
- ),
'messages' => array(
'math_tip',
'math_sample',
diff --git a/modules/ext.math.editbutton.js b/modules/ext.math.editbutton.js
index b5d9fbd..c2742d5 100644
--- a/modules/ext.math.editbutton.js
+++ b/modules/ext.math.editbutton.js
@@ -1,11 +1,13 @@
( function ( mw ) {
- 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 ) );
+ 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 ) );
--
To view, visit https://gerrit.wikimedia.org/r/184127
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: He7d3r <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Martineznovo <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits