Add keybind for adding new post to QR dump list. #619

This commit is contained in:
ccd0 2016-10-08 11:57:41 -07:00
parent 184818c526
commit 64886c1a5c
3 changed files with 15 additions and 0 deletions

View File

@ -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()

View File

@ -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

View File

@ -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.'