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']
|
when Conf['Toggle sage']
|
||||||
return unless QR.nodes and !QR.nodes.el.hidden
|
return unless QR.nodes and !QR.nodes.el.hidden
|
||||||
Keybinds.sage()
|
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']
|
when Conf['Submit QR']
|
||||||
return unless QR.nodes and !QR.nodes.el.hidden
|
return unless QR.nodes and !QR.nodes.el.hidden
|
||||||
QR.submit() if !QR.status()
|
QR.submit() if !QR.status()
|
||||||
@ -196,10 +199,6 @@ Keybinds =
|
|||||||
when Conf['Next Post Quoting You']
|
when Conf['Next Post Quoting You']
|
||||||
return unless threadRoot and QuoteYou.db
|
return unless threadRoot and QuoteYou.db
|
||||||
QuoteYou.cb.seek 'following'
|
QuoteYou.cb.seek 'following'
|
||||||
when Conf['Toggle Cooldown']
|
|
||||||
return unless Conf['customCooldown']
|
|
||||||
return unless QR.nodes
|
|
||||||
QR.toggleCustomCooldown()
|
|
||||||
<% if (readJSON('/.tests_enabled')) { %>
|
<% if (readJSON('/.tests_enabled')) { %>
|
||||||
when 'v'
|
when 'v'
|
||||||
return unless threadRoot
|
return unless threadRoot
|
||||||
|
|||||||
@ -203,7 +203,7 @@ QR =
|
|||||||
QR.nodes.customCooldown.classList.toggle 'disabled', !enabled
|
QR.nodes.customCooldown.classList.toggle 'disabled', !enabled
|
||||||
|
|
||||||
toggleCustomCooldown: ->
|
toggleCustomCooldown: ->
|
||||||
enabled = 'disabled' in QR.nodes.customCooldown.classList
|
enabled = $.hasClass QR.nodes.customCooldown, 'disabled'
|
||||||
QR.setCustomCooldown enabled
|
QR.setCustomCooldown enabled
|
||||||
$.set 'customCooldownEnabled', enabled
|
$.set 'customCooldownEnabled', enabled
|
||||||
|
|
||||||
|
|||||||
@ -859,6 +859,10 @@ Config =
|
|||||||
'Alt+s'
|
'Alt+s'
|
||||||
'Toggle sage in options field.'
|
'Toggle sage in options field.'
|
||||||
]
|
]
|
||||||
|
'Toggle Cooldown': [
|
||||||
|
'Alt+Comma'
|
||||||
|
'Toggle custom cooldown timer.'
|
||||||
|
]
|
||||||
'Submit QR': [
|
'Submit QR': [
|
||||||
'Ctrl+Enter'
|
'Ctrl+Enter'
|
||||||
'Submit post.'
|
'Submit post.'
|
||||||
@ -996,10 +1000,6 @@ Config =
|
|||||||
'Alt+Down'
|
'Alt+Down'
|
||||||
'Scroll to the next post that quotes you.'
|
'Scroll to the next post that quotes you.'
|
||||||
]
|
]
|
||||||
'Toggle Cooldown': [
|
|
||||||
'Alt+Comma'
|
|
||||||
'Toggle custom cooldown timer.'
|
|
||||||
]
|
|
||||||
|
|
||||||
updater:
|
updater:
|
||||||
checkbox:
|
checkbox:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user