timeago
This commit is contained in:
@ -32,5 +32,26 @@
|
||||
<section id="main">
|
||||
{{{body}}}
|
||||
</section>
|
||||
|
||||
<script type="text/javascript" src="/js/jquery-3.1.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.timeago.js"></script>
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
let s = $.timeago.settings;
|
||||
let str = s.strings;
|
||||
s.refreshMillis = 1000;
|
||||
s.allowFuture = true;
|
||||
s.localeTitle = true;
|
||||
str.seconds = "%d seconds";
|
||||
str.minute = "1 minute";
|
||||
str.hour = "1 hour";
|
||||
str.hours = "%d hours";
|
||||
str.day = "1 day";
|
||||
str.month = "1 month";
|
||||
str.year = "1 year";
|
||||
str.suffixFromNow = null;
|
||||
$("time.timeago").timeago();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user