Added keybind to download images in gallery viewer

This commit is contained in:
Jake Mannens 2020-11-14 11:48:44 +11:00
parent 7742edd22c
commit 852f27403b
2 changed files with 10 additions and 0 deletions

View File

@ -254,6 +254,8 @@ Gallery =
Gallery.cb.rotateLeft Gallery.cb.rotateLeft
when Conf['Rotate image clockwise'] when Conf['Rotate image clockwise']
Gallery.cb.rotateRight Gallery.cb.rotateRight
when Conf['Download Gallery Image']
Gallery.cb.download
return unless cb return unless cb
e.stopPropagation() e.stopPropagation()
@ -288,6 +290,10 @@ Gallery =
blank: (e) -> Gallery.cb.close() if e.target is @ blank: (e) -> Gallery.cb.close() if e.target is @
toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']() toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']()
download: ->
name = $ '.gal-name'
name.click()
pause: -> pause: ->
Gallery.cb.stop() Gallery.cb.stop()
{current} = Gallery.nodes {current} = Gallery.nodes

View File

@ -1016,6 +1016,10 @@ Config =
'Shift+Left' 'Shift+Left'
'Rotate image anticlockwise in gallery.' 'Rotate image anticlockwise in gallery.'
] ]
'Download Gallery Image': [
'Shift+j'
'Download current image in gallery.'
]
'fappeTyme': [ 'fappeTyme': [
'f' 'f'
'Toggle Fappe Tyme.' 'Toggle Fappe Tyme.'