git ssb

16+

Dominic / patchbay



Commit fdf74ff85a96f84b69b048224dc848094659b533

revert to human-time defaults

Ev Bogue committed on 10/31/2016, 12:58:03 AM
Parent: db08248601a75fff9e92246d75b015ee85e76bb6

Files changed

modules/timestamp.jschanged
modules/timestamp.jsView
@@ -1,12 +1,7 @@
11 var h = require('hyperscript')
2-var _human = require('human-time')
2 +var human = require('human-time')
33
4-function human (date) {
5- var s =_human(date).split(' ')
6- return s[0] + (s[1] == 'month' ? 'M' : s[1][0])
7-}
8-
94 function updateTimestampEl(el) {
105 el.firstChild.nodeValue = human(new Date(el.timestamp))
116 return el
127 }
@@ -16,14 +11,11 @@
1611 els.forEach(updateTimestampEl)
1712 }, 60e3)
1813
1914 exports.message_meta = function (msg) {
20- var d = new Date(msg.value.timestamp)
2115 return updateTimestampEl(h('a.enter.timestamp', {
2216 href: '#'+msg.key,
2317 timestamp: msg.value.timestamp,
24- title: _human(d) + '\n'+d
18 + title: new Date(msg.value.timestamp)
2519 }, ''))
2620 }
2721
28-
29-

Built with git-ssb-web