Only show MD5 quick filter notification when using keybind. #2385
This commit is contained in:
parent
46fb24219b
commit
c9ebeabb12
@ -266,7 +266,7 @@ Filter =
|
|||||||
ta.setSelectionRange tl, tl
|
ta.setSelectionRange tl, tl
|
||||||
ta.focus()
|
ta.focus()
|
||||||
|
|
||||||
quickFilterMD5: ->
|
quickFilterMD5: (e) ->
|
||||||
post = Get.postFromNode @
|
post = Get.postFromNode @
|
||||||
files = post.files.filter((f) -> f.MD5)
|
files = post.files.filter((f) -> f.MD5)
|
||||||
return unless files.length
|
return unless files.length
|
||||||
@ -277,6 +277,13 @@ Filter =
|
|||||||
PostHiding.hide origin
|
PostHiding.hide origin
|
||||||
else if g.VIEW is 'index'
|
else if g.VIEW is 'index'
|
||||||
ThreadHiding.hide origin.thread
|
ThreadHiding.hide origin.thread
|
||||||
|
|
||||||
|
unless e.type is 'keydown'
|
||||||
|
# feedback for when nothing gets hidden
|
||||||
|
if post.nodes.post.getBoundingClientRect().height
|
||||||
|
new Notice 'info', 'MD5 filtered.', 2
|
||||||
|
return
|
||||||
|
|
||||||
{notice} = Filter.quickFilterMD5
|
{notice} = Filter.quickFilterMD5
|
||||||
if notice
|
if notice
|
||||||
notice.filters.push filter
|
notice.filters.push filter
|
||||||
|
|||||||
@ -211,7 +211,7 @@ Keybinds =
|
|||||||
return unless threadRoot
|
return unless threadRoot
|
||||||
post = Keybinds.post threadRoot
|
post = Keybinds.post threadRoot
|
||||||
Keybinds.hl +1, threadRoot
|
Keybinds.hl +1, threadRoot
|
||||||
Filter.quickFilterMD5.call post
|
Filter.quickFilterMD5.call post, e
|
||||||
when Conf['Previous Post Quoting You']
|
when Conf['Previous Post Quoting You']
|
||||||
return unless threadRoot and QuoteYou.db
|
return unless threadRoot and QuoteYou.db
|
||||||
QuoteYou.cb.seek 'preceding'
|
QuoteYou.cb.seek 'preceding'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user