Add keybind for adding new post to QR dump list. #619
This commit is contained in:
parent
184818c526
commit
64886c1a5c
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user