diff --git a/4chan_x.user.js b/4chan_x.user.js index 6d898980c..4b8bd4dd1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1684,16 +1684,16 @@ }); time.funk = Function('time', "return '" + code + "'"); return g.callbacks.push(function(root) { - var day, hour, min_sec, month, s, timeEl, year, _, _ref; + var day, hour, min, month, s, timeEl, year, _, _ref; if (root.className === 'inline') { return; } s = $('span[id^=no]', root).previousSibling; - _ref = s.textContent.match(/(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\S+)/), _ = _ref[0], month = _ref[1], day = _ref[2], year = _ref[3], hour = _ref[4], min_sec = _ref[5]; + _ref = s.textContent.match(/(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/), _ = _ref[0], month = _ref[1], day = _ref[2], year = _ref[3], hour = _ref[4], min = _ref[5]; year = "20" + year; month -= 1; hour = g.chanOffset + Number(hour); - time.date = new Date(year, month, day, hour); + time.date = new Date(year, month, day, hour, min); timeEl = $.el('time', { textContent: time.funk(time) }); diff --git a/script.coffee b/script.coffee index a294a8470..f86659c07 100644 --- a/script.coffee +++ b/script.coffee @@ -1324,13 +1324,13 @@ time = g.callbacks.push (root) -> return if root.className is 'inline' s = $('span[id^=no]', root).previousSibling - [_, month, day, year, hour, min_sec] = - s.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\S+)/ + [_, month, day, year, hour, min] = + s.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/ year = "20#{year}" month -= 1 #months start at 0 hour = g.chanOffset + Number hour - time.date = new Date year, month, day, hour - #XXX min_sec unused + time.date = new Date year, month, day, hour, min + #XXX /b/ will have seconds cut off timeEl = $.el 'time', textContent: time.funk time