Wikipedia:WikiProject User scripts/Scripts/warn.js

This is an old revision of this page, as edited by Sceptre (talk | contribs) at 00:50, 6 February 2006 (add sig). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
function warn()
{
    var txt = document.editform.wpTextbox1;
var prompter = prompt("Which warning do you wish to issue?");
var msgtext = "{{subst:" + prompter + "}}~~~~";
var summary = "{{" + prompter + "}}";
    document.editform.wpSummary.value = summary;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += msgtext;
    document.editform.submit();
}