MediaWiki:Common.js: различия между версиями
Материал из melioration.space
Sonys (обсуждение | вклад) |
Sonys (обсуждение | вклад) |
||
Строка 7: | Строка 7: | ||
function test2(va) { | function test2(va) { | ||
console.log(va); | console.log(va); | ||
+ | } | ||
+ | function test3(va) { | ||
+ | if ( MathJax ) MathJax.typeset(); | ||
} | } | ||
ve.trackSubscribeAll(test2); | ve.trackSubscribeAll(test2); | ||
+ | ve.trackSubscribe('activity.chem',test2); | ||
model.on( 'contextChange', function () { | model.on( 'contextChange', function () { |
Версия 20:46, 25 декабря 2020
mw.hook( 've.activationComplete' ).add( function() { console.log("Назначение"); if ( MathJax ) MathJax.typeset(); var view =ve.init.target.getSurface().getView(); var model = ve.init.target.getSurface().getModel(); var surface = ve.init.target.getSurface(); function test2(va) { console.log(va); } function test3(va) { if ( MathJax ) MathJax.typeset(); } ve.trackSubscribeAll(test2); ve.trackSubscribe('activity.chem',test2); model.on( 'contextChange', function () { try { console.log("Обновление"); //setTimeout(MathJax.typeset, 100); //if ( MathJax ) MathJax.typeset(); } catch(err){ console.log('Error in Gadget-Rechtschreibpruefung.js:documentUpdate'); console.log(err); } } ); });