Fix regression from v1.11.8.0 causing delete link not to work when Cooldown is off. #466
This commit is contained in:
parent
e71cfc19ff
commit
e9a8817d11
@ -95,7 +95,7 @@ DeleteLink =
|
|||||||
else if msg = resDoc.getElementById 'errmsg' # error!
|
else if msg = resDoc.getElementById 'errmsg' # error!
|
||||||
new Notice 'warning', msg.textContent, 20
|
new Notice 'warning', msg.textContent, 20
|
||||||
$.on link, 'click', DeleteLink.toggle if post.fullID is DeleteLink.post.fullID
|
$.on link, 'click', DeleteLink.toggle if post.fullID is DeleteLink.post.fullID
|
||||||
if /\bwait\b/i.test msg.textContent
|
if Conf['Quick Reply'] and Conf['Cooldown'] and /\bwait\b/i.test(msg.textContent)
|
||||||
DeleteLink.cooldown.start post, 5
|
DeleteLink.cooldown.start post, 5
|
||||||
DeleteLink.auto[+fileOnly][post.fullID] = true
|
DeleteLink.auto[+fileOnly][post.fullID] = true
|
||||||
DeleteLink.nodes.links[+fileOnly].textContent = DeleteLink.linkText fileOnly
|
DeleteLink.nodes.links[+fileOnly].textContent = DeleteLink.linkText fileOnly
|
||||||
|
|||||||
@ -70,6 +70,7 @@ QR.cooldown =
|
|||||||
QR.cooldown.save [post.board.ID]
|
QR.cooldown.save [post.board.ID]
|
||||||
|
|
||||||
secondsDeletion: (post) ->
|
secondsDeletion: (post) ->
|
||||||
|
return 0 unless Conf['Quick Reply'] and Conf['Cooldown']
|
||||||
cooldowns = QR.cooldown.data[post.board.ID] or {}
|
cooldowns = QR.cooldown.data[post.board.ID] or {}
|
||||||
for start, cooldown of cooldowns
|
for start, cooldown of cooldowns
|
||||||
if !cooldown.delay? and cooldown.threadID is post.thread.ID and cooldown.postID is post.ID
|
if !cooldown.delay? and cooldown.threadID is post.thread.ID and cooldown.postID is post.ID
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user