Jump to content

Wikipedia:WikiProject User scripts/Scripts/warn.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Sceptre (talk | contribs) at 00:41, 6 February 2006 (add this new fantastic script). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

<pre> 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(); } </pre>