10

Power users may have experienced this situation before: They see a question that’s clearly a duplicate, so they hunt down the duplicate target and close the question. It’s only then that they realize that the question was improperly tagged, so they cannot hammer it, although they expected it to work.

This commonly happens to me personally when closing Python questions, which then fails when the question has a versioned Python tag but is missing the general Python tag which I have the gold badge for.

This userscript is made for exactly that situation and warns you when you are about to close a question as a duplicate, and you do not have a gold badge to hammer it. That way, you can check the tags first, and maybe get someone else to fix it, before you can hammer it.

Once you open the close dialog, the userscript tells you immediately whether you can hammer-close a question:

A hammer icon in red is displayed next to the “duplicate of…” close reason

If you go further, it gives you a more prominent warning:

A colored warning is displayed in the duplicate question selection view

If you do have a gold badge to hammer a question, this is confirmed with a green icon:

A hammer icon in green is displayed next to the “duplicate of…” close reason


Install and source

Changelog

  • 1.1.0: Add support for cloe review queue; adjust button label when hammering
  • 1.0.x: Compatibility improvements for Greasemonkey 4
  • 1.0.0: Initial release
  • It would be interesting to see a version of this script that implements the suggestion in this feature-request - i.e. add a gold-badge symbol, or the current hammer symbol, to the Vote to Close button that actually enacts the closure. – E.P. Jan 18 '18 at 16:59
  • It would also be good for this script to apply to the close-vote review queue. – E.P. Jan 19 '18 at 15:22
  • @E.P. I was very hesitant to add a button label change since the button is shared between all the close reasons, so I would have to change it back and forth. But, I’ve done that now anyway, so have fun with it. I also added support for the review queue. – poke Feb 10 '18 at 1:59
  • The script incorrectly claims that I can hammer a question after I edit the tags (i.e. change python-3.x to python). Any chance you could update the script so it tracks the changes I make to the tags, and doesn't display an incorrect message? – Aran-Fey Apr 23 '18 at 19:42
  • @Aran-Fey Uhhhh, I don’t think that will be possible nicely. There is nothing that can tell me that before clicking the button, so I would have to track this myself and that would be very messy. So I’ll have to decline that request; I don’t think it’s really worth the necessary effort :/ – poke Apr 23 '18 at 19:46
  • Is my suspicion correct that this doesn't work for the much rarer case of unhammering dupes? – Andras Deak Mar 7 at 17:03
  • 1
    @Andras You mean for reopening questions? Yeah, that likely isn’t supported by this since you also don’t get a pretty UI for that. I could see if I can come up with a way though if you would like this. – poke Mar 7 at 20:57
  • Ah, right, I didn't realize that there was no popup in that case. Please don't do any work for me; I don't even have a gold badge ;) Today was the first time when this came up (something hammered by a [pandas] gold badger wasn't reopened by a [python] badger due to missing tags). This has to be very rare so I don't think it's worth spending development time on :) – Andras Deak Mar 7 at 21:04
  • 1
    Alright :) If anyone else stumbles upon this and would like this, please tell me and I’ll consider it! (I will need some good example to figure out a mechanism though.. I’m a bit too scared to randomly press on reopen links ^^) – poke Mar 7 at 21:47

You must log in to answer this question.

Browse other questions tagged .