diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 8c811686d..87cf788e7 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -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 diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 4a6eb614d..fee149392 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -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 diff --git a/src/config/Config.coffee b/src/config/Config.coffee index 16f42b9c1..60f052e2b 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -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: