Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


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



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!

share|improve this question
This looks like nearly the same functionality as "Auto-Add A Comment When Closing". – Brock Adams Jul 8 '13 at 23:03
The source code link is dead, has been for >year. – Mogsdad Jul 7 '15 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 Jul 7 '15 at 15:30
The source link should be changed to – J F Jul 10 at 13:39

You must log in to answer this question.

Browse other questions tagged .