mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-05 22:30:07 +01:00
19 lines
430 B
JavaScript
19 lines
430 B
JavaScript
var templates = {};
|
|
|
|
function loadTemplates(templatesToLoad) {
|
|
var timestamp = new Date().getTime();
|
|
|
|
for (var t in templatesToLoad) {
|
|
(function(template) {
|
|
$.get('templates/' + template + '.tpl?v=' + timestamp, function(html) {
|
|
templates[template] = html;
|
|
});
|
|
}(templatesToLoad[t]));
|
|
}
|
|
}
|
|
|
|
function templates_init() {
|
|
loadTemplates(['register', 'home', 'login', 'reset']);
|
|
}
|
|
|
|
templates_init(); |