That's simpler.

This commit is contained in:
Nicolas Stepien 2013-02-26 18:57:21 +01:00
parent 384a95163d
commit 1c71b4109d
2 changed files with 4 additions and 7 deletions

View File

@ -5849,7 +5849,7 @@
},
set: function(data) {
var cooldown, hasFile, isReply, isSage, start, type;
start = data.req ? data.req.uploadEndTime : Date.now();
start = data.start || Date.now();
if (data.delay) {
cooldown = {
delay: data.delay
@ -6686,7 +6686,7 @@
postID: postID
}, QR.nodes.el);
QR.cooldown.set({
req: req,
start: req.uploadEndTime,
post: reply,
isReply: !!threadID
});

View File

@ -159,10 +159,7 @@ QR =
QR.cooldown.cooldowns[id] = cooldowns[id]
QR.cooldown.start()
set: (data) ->
start = if data.req
data.req.uploadEndTime
else
Date.now()
start = data.start or Date.now()
if data.delay
cooldown = delay: data.delay
else
@ -916,7 +913,7 @@ QR =
}, QR.nodes.el
QR.cooldown.set
req: req
start: req.uploadEndTime
post: reply
isReply: !!threadID