This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/client/js/util/handlebars-helpers.js

15 lines
405 B
JavaScript

'use strict';
const handlebars = require('handlebars');
const misc = require('./misc.js');
handlebars.registerHelper('reltime', function(time) {
return new handlebars.SafeString(
'<time datetime="' + time + '" title="' + time + '">' +
misc.formatRelativeTime(time) +
'</time>');
});
handlebars.registerHelper('toLowerCase', function(str) {
return str.toLowerCase();
});