Fixes to custom cooldown keybind PR.
Fix applicability condition, move keybind near other QR-related ones in list.
This commit is contained in:
parent
61ae894ad2
commit
c67db5eed5
@ -77,6 +77,9 @@ Keybinds =
|
||||
when Conf['Toggle sage']
|
||||
return unless QR.nodes and !QR.nodes.el.hidden
|
||||
Keybinds.sage()
|
||||
when Conf['Toggle Cooldown']
|
||||
return unless QR.nodes and !QR.nodes.el.hidden and $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown')
|
||||
QR.toggleCustomCooldown()
|
||||
when Conf['Submit QR']
|
||||
return unless QR.nodes and !QR.nodes.el.hidden
|
||||
QR.submit() if !QR.status()
|
||||
@ -196,10 +199,6 @@ 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 = 'disabled' in QR.nodes.customCooldown.classList
|
||||
enabled = $.hasClass QR.nodes.customCooldown, 'disabled'
|
||||
QR.setCustomCooldown enabled
|
||||
$.set 'customCooldownEnabled', enabled
|
||||
|
||||
|
||||
@ -859,6 +859,10 @@ Config =
|
||||
'Alt+s'
|
||||
'Toggle sage in options field.'
|
||||
]
|
||||
'Toggle Cooldown': [
|
||||
'Alt+Comma'
|
||||
'Toggle custom cooldown timer.'
|
||||
]
|
||||
'Submit QR': [
|
||||
'Ctrl+Enter'
|
||||
'Submit post.'
|
||||
@ -996,10 +1000,6 @@ Config =
|
||||
'Alt+Down'
|
||||
'Scroll to the next post that quotes you.'
|
||||
]
|
||||
'Toggle Cooldown': [
|
||||
'Alt+Comma'
|
||||
'Toggle custom cooldown timer.'
|
||||
]
|
||||
|
||||
updater:
|
||||
checkbox:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user