Add 'Post from URL' keybind. #730

This commit is contained in:
ccd0 2016-10-08 10:29:00 -07:00
parent 723776e0c9
commit 184818c526
3 changed files with 8 additions and 0 deletions

View File

@ -80,6 +80,9 @@ Keybinds =
when Conf['Toggle Cooldown']
return unless QR.nodes and !QR.nodes.el.hidden and $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown')
QR.toggleCustomCooldown()
when Conf['Post from URL']
return unless QR.postingIsEnabled
QR.handleUrl ''
when Conf['Submit QR']
return unless QR.nodes and !QR.nodes.el.hidden
QR.submit() if !QR.status()

View File

@ -389,6 +389,7 @@ QR =
return
handleUrl: (urlDefault) ->
QR.open()
url = prompt 'Enter a URL:', urlDefault
return if url is null
QR.nodes.fileButton.focus()

View File

@ -863,6 +863,10 @@ Config =
'Alt+Comma'
'Toggle custom cooldown timer.'
]
'Post from URL': [
'Alt+l'
'Post from URL.'
]
'Submit QR': [
'Ctrl+Enter'
'Submit post.'