Jump to content

User:Rcsprinter123/warn.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
*/
function warn()
{
    var txt = document.editform.wpTextbox1;
var prefix = prompt("What is the prefix? Change if appropriate", "uw-")
var type = prompt("Which standard warning do you wish to issue?", "test");
var severity = prompt("How severe is the violation?", "1");
var page = prompt("What page?");
var msgtext = "{{subst:"+prefix + type + severity + "|" + page + "|subst=subst:}} <font color="#00ACF4">'''[[User:Rcsprinter123|<span style="font-family:cambria; font-size:11pt; color:gray">Rcsprinter</span>]]''' [[User talk:Rcsprinter123|<span style="font-family:calibri; font-size:9pt; color:black">(Gimme a message)</span>]]</font> 10:30, 28 October 2011 (UTC)";
if(page.length == 0) {page = "Wikipedia"} else { page = "[["+page+"]]" };
var summary = "Your recent edits to " + page ;
    document.editform.wpSummary.value = summary;
    document.editform.wpMinoredit.checked = true;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += msgtext;
    document.editform.submit();
}
/*