Add keybinding for toggling custom cooldown.

This commit is contained in:
AchtBit 2016-10-07 20:16:23 -05:00
parent 7b456ba9db
commit 62dfb5e8da
3 changed files with 9 additions and 1 deletions

View File

@ -196,6 +196,10 @@ Keybinds =
when Conf['Next Post Quoting You']
return unless threadRoot and QuoteYou.db
QuoteYou.cb.seek 'following'
when Conf['Toggle Cooldown']
return unless Conf['customCooldown']
return unless QR.nodes
QR.toggleCustomCooldown()
<% if (readJSON('/.tests_enabled')) { %>
when 'v'
return unless threadRoot

View File

@ -203,7 +203,7 @@ QR =
QR.nodes.customCooldown.classList.toggle 'disabled', !enabled
toggleCustomCooldown: ->
enabled = $.hasClass @, 'disabled'
enabled = 'disabled' in QR.nodes.customCooldown.classList
QR.setCustomCooldown enabled
$.set 'customCooldownEnabled', enabled

View File

@ -996,6 +996,10 @@ Config =
'Alt+Down'
'Scroll to the next post that quotes you.'
]
'Toggle Cooldown': [
'Shift+p'
'Toggle custom cooldown timer.'
]
updater:
checkbox: