mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-12-19 03:20:44 +00:00
00405b0309
Remove all mappings in the closures like in I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b in core. Change-Id: Ie9a2fadb8e276774784a4937bb5c3ec11f213352
21 lines
522 B
JavaScript
21 lines
522 B
JavaScript
// Register the Hogan compiler with MediaWiki.
|
|
( function () {
|
|
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 );
|
|
}
|
|
}() );
|