# Auto-comment Close Reasons

## Description

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.

## 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!

-
This looks like nearly the same functionality as "Auto-Add A Comment When Closing". –  Brock Adams Jul 8 '13 at 23:03