1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*global Mustache */ ( function ( mw, $ ) { // Register mustache compiler mw.template.registerCompiler( 'mustache', { compile: function ( src ) { return { render: function ( data ) { return $( $.parseHTML( Mustache.render( src, data ) ) ); } }; } } ); }( mediaWiki, jQuery ) );