Extension:Math/modifyMenu.js

Back to How to Modify the MathJax Contextual Menu /* Any JavaScript here will be loaded for all users on every page load. */  /* Created by Amber Liu */ /* Adds a menu button 'Hello' that displays 'Hello World!' */

mw.loader.using( 'ext.math.mathjax.localization', function {     MathJax.Callback.Queue( MathJax.Hub.Register.StartupHook("MathMenu Ready",function  {         MathJax.Menu.menu.items[3] = MathJax.Menu.ITEM.COMMAND("Hello", function  { console.log("Hello World!"); });     })); });