mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-12-23 13:23:36 +00:00
6dee0147f4
* 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
21 lines
537 B
JavaScript
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 ) );
|