User:ערן/mathjaxdialog.js: Difference between revisions

Content deleted Content added
No edit summary
m Remove legacy globals per phab:T72470 (via WP:JWB)
 
(5 intermediate revisions by 2 users not shown)
Line 1:
/* Math editor based on mathJax */
 
$(document).ready(function(){
 
if ($.inArray(mw.config.get('wgAction'),['edit','submit'])!=-1) mw.loader.using(['ext.wikiEditor'],function(){
function mathDialog(){
mw.loader.using(['jquery.ui.dialog','ext.math.mathjax.enabler'],function(){
var mathEditor=$('<div>');
var mathInput=$('<input>',{dir:'ltr'}).appendTo(mathEditor);
Line 11 ⟶ 13:
$(this).dialog('close');
},
'Help':function(){window.open(mw.util.wikiGetlinkgetUrl('Help:Math'))},
'Cancel': function(){ $(this).dialog('close');}
} });
Line 27 ⟶ 29:
});
}
$(document).ready(function(){
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
Line 40 ⟶ 42:
}
} );
})
 
})