<!-- thumbnail: https://i.sstatic.net/2OQ1M.png -->
<!-- version: 1.0 -->
<!-- tag: comments -->
<!-- excerpt: Adds easy buttons to fetch comment code and copy it to the clipboard. -->

###About:

This userscript restores missing/obsolete close-vote reasons to the close-vote dialog.

This script is in response to:

 1. A [chat request][1] where the poster [used it in conjunction with a bug report][2].
 2. Requests, like [this one][3], to restore/add the customary close reasons to *Teams* sites -- which currently only officially support closing as a duplicate?

###Features:

 - 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][4].
 - 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.

###Screenshot:

> [![Screenshot of enhanced close dialog][5]][6]

<br>
###Platform:

This is a userscript that runs in your browser.  It requires a userscript extension like *Tampermonkey* or *Violentmonkey*.

<br>

###Install button:&emsp;<kbd>[Install from GitHub][7]</kbd>

###Code:

The code is [on GitHub, in the BrockA/SE-misc repository][8].  

Post bug reports and pull requests there. <sup><sub>(Or below if you don't do GitHub.)</sub></sup>  

<br>
**Known issues:**

 1. Not yet sanctioned by the SE team.  **USE SPARINGLY, lest ye be banned.**
 1. The "You have already voted to close this question" dialogs can't seem to get the non-standard close reason.
 1. The close-vote count is not updated on a successful close-vote.  Reload the page to see that for now.
 1. The Off topic reasons are not supported yet -- if the site does not offer them natively.
 1. Close-voting by low-rep users via flagging is not well tested. Seems to work, but if it glitches, I may not support it.
 1. Closing from review was not tested at all.  If it glitches, I may not support it.
 1. Will not support Greasemonkey 4+.  Use Tampermonkey or Violentmonkey, or equivalent.


  [1]: https://chat.stackexchange.com/transcript/message/50188645#50188645
  [2]: https://meta.stackexchange.com/questions/327903/possible-to-vote-to-close-for-old-decommissioned-close-reasons-with-proof-of-c
  [3]: https://meta.stackoverflow.com/questions/377878/how-do-i-close-a-question-on-teams-for-a-reason-other-than-duplicate
  [4]: https://data.stackexchange.com/stackoverflow/query/1042309/closereasontypes
  [5]: https://i.sstatic.net/J1mNml.png "Click for larger image."
  [6]: https://i.sstatic.net/J1mNm.png "Click for larger image."
  [7]: https://github.com/BrockA/SE-misc/raw/master/Stack%20Exchange%2C%20Close%20Vote%20Reasons%2C%20Add%20em%20back.user.js
  [8]: https://github.com/BrockA/SE-misc/blob/master/Stack%20Exchange%2C%20Close%20Vote%20Reasons%2C%20Add%20em%20back.user.js