Add keybind for filtering image MD5s (default: "5").
This commit is contained in:
parent
76f8118872
commit
dc29011c10
@ -171,6 +171,7 @@ Filter =
|
||||
|
||||
quickFilterMD5: ->
|
||||
post = Get.postFromNode @
|
||||
return unless post.file
|
||||
Filter.addFilter 'MD5', "/#{post.file.MD5}/"
|
||||
origin = post.origin or post
|
||||
if origin.isReply
|
||||
|
||||
@ -199,6 +199,11 @@ Keybinds =
|
||||
return unless thread and ThreadHiding.db
|
||||
Header.scrollTo threadRoot
|
||||
ThreadHiding.toggle thread
|
||||
when Conf['Quick Filter MD5']
|
||||
return unless threadRoot
|
||||
post = Keybinds.post threadRoot
|
||||
Keybinds.hl +1, threadRoot
|
||||
Filter.quickFilterMD5.call post
|
||||
when Conf['Previous Post Quoting You']
|
||||
return unless threadRoot and QuoteYou.db
|
||||
QuoteYou.cb.seek 'preceding'
|
||||
@ -255,10 +260,13 @@ Keybinds =
|
||||
if e.shiftKey then key = 'Shift+' + key
|
||||
key
|
||||
|
||||
post: (thread) ->
|
||||
$('.post.highlight', thread) or $('.op', thread)
|
||||
|
||||
qr: (thread) ->
|
||||
QR.open()
|
||||
if thread?
|
||||
QR.quote.call $ 'input', $('.post.highlight', thread) or thread
|
||||
QR.quote.call Keybinds.post thread
|
||||
QR.nodes.com.focus()
|
||||
|
||||
tags: (tag, ta) ->
|
||||
@ -297,8 +305,8 @@ Keybinds =
|
||||
if all
|
||||
ImageExpand.cb.toggleAll()
|
||||
else
|
||||
post = Get.postFromNode $('.post.highlight', thread) or $ '.op', thread
|
||||
ImageExpand.toggle post
|
||||
post = Get.postFromNode Keybinds.post thread
|
||||
ImageExpand.toggle post if post.file
|
||||
|
||||
open: (thread, tab) ->
|
||||
return if g.VIEW isnt 'index'
|
||||
|
||||
@ -1009,6 +1009,10 @@ Config =
|
||||
'x'
|
||||
'Hide thread.'
|
||||
]
|
||||
'Quick Filter MD5': [
|
||||
'5'
|
||||
'Add the MD5 of the selected image to the filter list.'
|
||||
]
|
||||
'Previous Post Quoting You': [
|
||||
'Alt+Up'
|
||||
'Scroll to the previous post that quotes you.'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user