mediawiki-extensions-Relate.../resources/mediawiki.template.muhogan/muhogan.js
jdlrobson 6dee0147f4 Migrate Cards code to RelatedArticles
* Move across all files
* Rename ext-card- prefix to ext-related-articles- prefix
** Since all code using these prefixes is JS
  we do not have to worry about cached HTML

Bug: T137021
Change-Id: I784fd132c36329fa0dcc49fe2804460061940347
2017-06-07 08:35:53 -07:00

21 lines
537 B
JavaScript

// Register the Hogan compiler with MediaWiki.
( function ( mw ) {
var compiler;
/*
* Check if muhogan is already registered (by QuickSurveys). If not
* register mustache (Desktop) or hogan (Mobile) as muhogan.
*/
try {
mw.template.getCompiler( 'muhogan' );
} catch ( e ) {
try {
compiler = mw.template.getCompiler( 'mustache' );
} catch ( e2 ) {
compiler = mw.template.getCompiler( 'hogan' );
}
// register hybrid compiler with core
mw.template.registerCompiler( 'muhogan', compiler );
}
}( mediaWiki ) );