This script will automagically fill the comment box for you when you vote to close with the reason you are voting to close for! That way the user that asked the question can know what is wrong with their question so that they can fix it.

It will include bold, italics, and links in the comment.

The comment box will be filled, but it won't automatically send the comment - you can choose whether or not you want to add the comment.


You can download this on userscripts.org.



Minified Source Code (full source here)

var sEl=document.createElement("script");sEl["textContent"in sEl?"textContent":"text"]="("+function(){$(document).on("click",".popup-submit",function(){$(".question").find(".comments-link").click();var e=$(".action-selected").find("[class^=action-]").last().html();e=e.replace(/<span.*class="bounty-indicator-tab.*<\/span>/,"").trim().replace(/<\/?b>/g,"**").replace(/<\/?i>/g,"*").replace(/<a href="(.*?)".*?>(.*?)<\/a>/g,"[$2]($1)");$(".question").find("textarea").text(e)})}+")()";document.head.appendChild(sEl);sEl.parentNode.removeChild(sEl)

Bug reports and feedback will be appreciated!

  • 3
    This looks like nearly the same functionality as "Auto-Add A Comment When Closing". Commented Jul 8, 2013 at 23:03
  • The source code link is dead, has been for >year.
    – Mogsdad
    Commented Jul 7, 2015 at 14:35
  • Unlike "Auto-Add A Comment When Closing", this one still works, and gives you a chance to edit the comment before submitting.
    – Mogsdad
    Commented Jul 7, 2015 at 15:30
  • The source link should be changed to userscripts-mirror.org.
    – J F
    Commented Jul 10, 2016 at 13:39


You must log in to answer this question.

Browse other questions tagged .