Less derping, more getting shit done.
This commit is contained in:
parent
cca5983e30
commit
0e7d0935b9
@ -2035,17 +2035,12 @@
|
|||||||
return g.callbacks.push(Time.node);
|
return g.callbacks.push(Time.node);
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
var day, hour, min, month, node, tc, time, year, _, _ref;
|
var day, hour, min, month, node, time, year, _, _ref;
|
||||||
if (root.className === 'inline') {
|
if (root.className === 'inline') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
node = $('span[id]', root).previousSibling;
|
node = root.className === 'op' ? $('.posttime', root) : $('span[id]', root).previousSibling;
|
||||||
tc = node.textContent;
|
_ref = node.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];
|
||||||
if (tc === ' ') {
|
|
||||||
node = node.previousSibling;
|
|
||||||
tc = node.textContent;
|
|
||||||
}
|
|
||||||
_ref = tc.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;
|
year = "20" + year;
|
||||||
month -= 1;
|
month -= 1;
|
||||||
hour = g.chanOffset + Number(hour);
|
hour = g.chanOffset + Number(hour);
|
||||||
|
|||||||
@ -1614,13 +1614,9 @@ Time =
|
|||||||
g.callbacks.push Time.node
|
g.callbacks.push Time.node
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
return if root.className is 'inline'
|
return if root.className is 'inline'
|
||||||
node = $('span[id]', root).previousSibling
|
node = if root.className is 'op' then $('.posttime', root) else $('span[id]', root).previousSibling
|
||||||
tc = node.textContent
|
|
||||||
if tc is ' '
|
|
||||||
node = node.previousSibling
|
|
||||||
tc = node.textContent
|
|
||||||
[_, month, day, year, hour, min] =
|
[_, month, day, year, hour, min] =
|
||||||
tc.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/
|
node.textContent.match /(\d+)\/(\d+)\/(\d+)\(\w+\)(\d+):(\d+)/
|
||||||
year = "20#{year}"
|
year = "20#{year}"
|
||||||
month -= 1 #months start at 0
|
month -= 1 #months start at 0
|
||||||
hour = g.chanOffset + Number hour
|
hour = g.chanOffset + Number hour
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user