Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.


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!

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

You must log in to answer this question.

Browse other questions tagged .