Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5959620
mediawiki.template.mustache.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
906 B
Referenced Files
None
Subscribers
None
mediawiki.template.mustache.js
View Options
/* global Mustache */
(
function
()
{
// Register mustache compiler
mw
.
template
.
registerCompiler
(
'mustache'
,
{
compile
:
function
(
src
)
{
return
{
/**
* @ignore
* @return {string} The raw source code of the template
*/
getSource
:
function
()
{
return
src
;
},
/**
* @ignore
* @param {Object} data Data to render
* @param {Object} partialTemplates Map partial names to Mustache template objects
* returned by mw.template.get()
* @return {jQuery} Rendered HTML
*/
render
:
function
(
data
,
partialTemplates
)
{
const
partials
=
{};
if
(
partialTemplates
)
{
for
(
const
name
in
partialTemplates
)
{
const
template
=
partialTemplates
[
name
];
partials
[
name
]
=
template
.
getSource
();
}
}
return
$
(
$
.
parseHTML
(
Mustache
.
render
(
src
,
data
,
partials
)
)
);
}
};
}
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 06:41 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7e/d3/83e922fd41f0d02d09d73996c375
Default Alt Text
mediawiki.template.mustache.js (906 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment