This userscript restores missing/obsolete close-vote reasons to the close-vote dialog.
This script is in response to:
- A chat request where the poster used it in conjunction with a bug report.
- Requests, like this one, to restore/add the customary close reasons to Teams sites -- which currently only officially support closing as a duplicate?
- Integrates with the standard close-vote dialog. But some of it is WIP, See the "Known issues", below.
- Adds back close reasons taken from a few SEDE queries like this one.
- Only Adds a reason if it is not already present.
- Works on regular sites and teams sites (but I only have 1 team to test against).
- The unofficial reasons are clearly indicated with warning iconography.
This is a userscript that runs in your browser. It requires a userscript extension like Tampermonkey or Violentmonkey.
Install button: Install from GitHub
The code is on GitHub, in the BrockA/SE-misc repository.
Post bug reports and pull requests there. (Or below if you don't do GitHub.)
- Not yet sanctioned by the SE team. USE SPARINGLY, lest ye be banned.
- The "You have already voted to close this question" dialogs can't seem to get the non-standard close reason.
- The close-vote count is not updated on a successful close-vote. Reload the page to see that for now.
- Although it adds back the generic Off topic reason, the "off-topic because..." reasons are not supported yet -- if the site does not offer them natively. (Also, it might not be sensible to on such sites due to the way the reasons and ids vary.)
- Close-voting by low-rep users via flagging is not well tested. Seems to work, but if it glitches, I may not support it.
- Closing from review was not tested at all. If it glitches, I may not support it.
- Will not support Greasemonkey 4+. Use Tampermonkey or Violentmonkey, or equivalent.