From e77fc9d8f96c325da912d0ba0fe7144be3643504 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 22 Aug 2019 14:54:11 -0700 Subject: [PATCH] Add option to enable/disable notification on quick filtering MD5s. #2408 --- src/Filtering/Filter.coffee | 4 ++-- src/config/Config.coffee | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index cddecf915..bcbd0e360 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -265,7 +265,7 @@ Filter = ta.setSelectionRange tl, tl ta.focus() - quickFilterMD5: (e) -> + quickFilterMD5: -> post = Get.postFromNode @ files = post.files.filter((f) -> f.MD5) return unless files.length @@ -277,7 +277,7 @@ Filter = else if g.VIEW is 'index' ThreadHiding.hide origin.thread - unless e.type is 'keydown' + unless Conf['MD5 Quick Filter Notifications'] # feedback for when nothing gets hidden if post.nodes.post.getBoundingClientRect().height new Notice 'info', 'MD5 filtered.', 2 diff --git a/src/config/Config.coffee b/src/config/Config.coffee index 62837fa6e..12a8b78d2 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -196,6 +196,11 @@ Config = 'Apply 4chan X filters in native catalog.' 1 ] + 'MD5 Quick Filter Notifications': [ + true + 'Show notification when quick filtering MD5s using the button or keybind.' + 1 + ] 'Recursive Hiding': [ true 'Hide replies of hidden posts, recursively.'