Add keybinding for toggling custom cooldown.
This commit is contained in:
parent
7b456ba9db
commit
62dfb5e8da
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user