From cc6e6a5febb64c6ea26c30d4139dbd6d59b0c493 Mon Sep 17 00:00:00 2001 From: Blank-Cheque <50619549+Blank-Cheque@users.noreply.github.com> Date: Sun, 9 Feb 2020 21:43:11 -0500 Subject: [PATCH] Add ability to select by score in queues (#214) * add select by score added ability to select by score greater than or less than x * Update queuetools.js * Accept suggestion to fix selectors Co-Authored-By: George * Accept suggestion to fix selectors Co-Authored-By: George Co-authored-by: George --- extension/data/modules/queuetools.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/extension/data/modules/queuetools.js b/extension/data/modules/queuetools.js index 03644fed6..086efced8 100644 --- a/extension/data/modules/queuetools.js +++ b/extension/data/modules/queuetools.js @@ -353,6 +353,8 @@ function queuetools () { all submissions self posts posts with flair + points >... + points <...   unhide all @@ -556,6 +558,16 @@ function queuetools () { case 'flair': selector = ':has(.linkflairlabel)'; break; + case 'pointsgt': { + const min = parseInt(prompt('points greater than:', '')); + selector = (_, el) => $(el).find('.score.unvoted').attr('title') > min; + break; + } + case 'pointslt': { + const max = parseInt(prompt('points less than:', '')); + selector = (_, el) => $(el).find('.score.unvoted').attr('title') < max; + break; + } } things.filter(selector).find('input[type=checkbox]').prop('checked', true); });