diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 20ddb6a76..fe9c9abbb 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -83,6 +83,9 @@ Keybinds = when Conf['Post from URL'] return unless QR.postingIsEnabled QR.handleUrl '' + when Conf['Add new post'] + return unless QR.postingIsEnabled + QR.addPost() when Conf['Submit QR'] return unless QR.nodes and !QR.nodes.el.hidden QR.submit() if !QR.status() diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index c2392a53f..56aa2d283 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -197,6 +197,14 @@ QR = texPreviewHide: -> $.rmClass QR.nodes.el, 'tex-preview' + addPost: -> + wasOpen = (QR.nodes and !QR.nodes.el.hidden) + QR.open() + if wasOpen + $.addClass QR.nodes.el, 'dump' + new QR.post true + QR.nodes.com.focus() + setCustomCooldown: (enabled) -> Conf['customCooldownEnabled'] = enabled QR.cooldown.customCooldown = enabled diff --git a/src/config/Config.coffee b/src/config/Config.coffee index b25850bc8..3a38e5985 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -867,6 +867,10 @@ Config = 'Alt+l' 'Post from URL.' ] + 'Add new post': [ + 'Alt+n' + 'Add new post to the QR dump list.' + ] 'Submit QR': [ 'Ctrl+Enter' 'Submit post.'