SO-Close-Vote-Reviewers / UserScripts

Various user scripts that add features to the review queue or to the chat room
Other
57 stars 40 forks source link

Choose "other" off-topic reasons correctly #111

Closed paulroub closed 6 years ago

paulroub commented 6 years ago

Will fail if more than 2 pre-existing custom reasons are present.

We just get the "index" of off-topic reasons, counting from 7 onward.

Basic stab at a fix for #110; probably wants guards or re-work to handle the case where more than 2 pre-existing custom reasons are present. What does the script do, regardless, if [10] needs to be used as a label?

paulroub commented 6 years ago

Currently, https://stackoverflow.com/review/close/17881591 is in the CVQ with an existing custom reason, if you need a place to test.

makyen commented 6 years ago

Thanks for working on this.

Re: [10] being needed: I'm fine with opening another issue for that. I'm open for others to discuss/choose what they desire (multiple possible solutions; e.g. just walking up the keyCode).

Minor nit: indenting on clickOffTopicReason(configuration.offTopicReasons.other.value, key - keys[configuration.offTopicReasons.other.key])

This isn't a script which I normally use, as I usually CV/CVQ with one hand on keyboard, other on mouse (and wrote a script to permit single-Alt-click to close and single-Alt-Ctrl-click to close+cv-pls, which I need to bang into shape to release).

I should be able to test this in a bit.