From f491373abe106690abd38970e5ccaf454a434826 Mon Sep 17 00:00:00 2001 From: Hexagon Date: Fri, 26 Sep 2014 23:13:37 +0200 Subject: [PATCH] Timestamps --- public/js/cryptalk_modules/console.js | 3 ++- public/js/cryptalk_modules/templates.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/js/cryptalk_modules/console.js b/public/js/cryptalk_modules/console.js index 7e1f2e4..e756df4 100644 --- a/public/js/cryptalk_modules/console.js +++ b/public/js/cryptalk_modules/console.js @@ -47,7 +47,8 @@ define( var tpl = templates.post[type], post, data = fandango.merge({}, settings, { - nick: nick + nick: nick, + timestamp: new Date().toLocaleTimeString() }); data.text = $.template(text, data); diff --git a/public/js/cryptalk_modules/templates.js b/public/js/cryptalk_modules/templates.js index 55b0dfc..31fa838 100644 --- a/public/js/cryptalk_modules/templates.js +++ b/public/js/cryptalk_modules/templates.js @@ -43,10 +43,10 @@ define({ // along with the current nick, room, mute-status and of course the message ('text'). post: { motd: '
  • {text}
  • ', - info: '
  • INF> {text}
  • ', - server: '
  • SRV> {text}
  • ', - error: '
  • ERR> {text}
  • ', - message: '
  • {nick}> {text}
  • ' + info: '
  • [{timestamp}] INF> {text}
  • ', + server: '
  • [{timestamp}] SRV> {text}
  • ', + error: '
  • [{timestamp}] ERR> {text}
  • ', + message: '
  • [{timestamp}] {nick}> {text}
  • ' }, // All message templates will have access to the properties in the 'settings' module,