Add 'Post from URL' keybind. #730
This commit is contained in:
parent
723776e0c9
commit
184818c526
@ -80,6 +80,9 @@ Keybinds =
|
|||||||
when Conf['Toggle Cooldown']
|
when Conf['Toggle Cooldown']
|
||||||
return unless QR.nodes and !QR.nodes.el.hidden and $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown')
|
return unless QR.nodes and !QR.nodes.el.hidden and $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown')
|
||||||
QR.toggleCustomCooldown()
|
QR.toggleCustomCooldown()
|
||||||
|
when Conf['Post from URL']
|
||||||
|
return unless QR.postingIsEnabled
|
||||||
|
QR.handleUrl ''
|
||||||
when Conf['Submit QR']
|
when Conf['Submit QR']
|
||||||
return unless QR.nodes and !QR.nodes.el.hidden
|
return unless QR.nodes and !QR.nodes.el.hidden
|
||||||
QR.submit() if !QR.status()
|
QR.submit() if !QR.status()
|
||||||
|
|||||||
@ -389,6 +389,7 @@ QR =
|
|||||||
return
|
return
|
||||||
|
|
||||||
handleUrl: (urlDefault) ->
|
handleUrl: (urlDefault) ->
|
||||||
|
QR.open()
|
||||||
url = prompt 'Enter a URL:', urlDefault
|
url = prompt 'Enter a URL:', urlDefault
|
||||||
return if url is null
|
return if url is null
|
||||||
QR.nodes.fileButton.focus()
|
QR.nodes.fileButton.focus()
|
||||||
|
|||||||
@ -863,6 +863,10 @@ Config =
|
|||||||
'Alt+Comma'
|
'Alt+Comma'
|
||||||
'Toggle custom cooldown timer.'
|
'Toggle custom cooldown timer.'
|
||||||
]
|
]
|
||||||
|
'Post from URL': [
|
||||||
|
'Alt+l'
|
||||||
|
'Post from URL.'
|
||||||
|
]
|
||||||
'Submit QR': [
|
'Submit QR': [
|
||||||
'Ctrl+Enter'
|
'Ctrl+Enter'
|
||||||
'Submit post.'
|
'Submit post.'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user