MediaWiki:Common.js: различия между версиями
Материал из melioration.space
Sonys (обсуждение | вклад) |
Sonys (обсуждение | вклад) |
||
Строка 21: | Строка 21: | ||
console.log("Обновление"); | console.log("Обновление"); | ||
//setTimeout(MathJax.typeset, 500); | //setTimeout(MathJax.typeset, 500); | ||
− | setTimeout(test3, | + | setTimeout(test3, 200); |
} catch(err){ | } catch(err){ | ||
console.log('Error in Gadget-Rechtschreibpruefung.js:documentUpdate'); | console.log('Error in Gadget-Rechtschreibpruefung.js:documentUpdate'); |
Версия 21:02, 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); setTimeout(test3, 50); } function test3() { if ( MathJax ) MathJax.typeset(); } ve.trackSubscribeAll(test2); //ve.trackSubscribe('activity.chem',test3); //ve.trackSubscribe('activity.chem',test3); model.on( 'contextChange', function () { try { console.log("Обновление"); //setTimeout(MathJax.typeset, 500); setTimeout(test3, 200); } catch(err){ console.log('Error in Gadget-Rechtschreibpruefung.js:documentUpdate'); console.log(err); } } ); });