Wikipedia:WikiProject User scripts/Scripts/warn.js: Difference between revisions

Content deleted Content added
m update
Tra (talk | contribs)
m Protected Wikipedia:WikiProject User scripts/Scripts/warn.js: to avoid security being compromised on user script [edit=sysop:move=sysop]
 
(6 intermediate revisions by one other user not shown)
Line 1:
/*<pre>
Script version 2.32.1
Versions 1.0-2.0 in history of [[User:Sceptre/monobook.js]]... I think
Changes to 2.3: Automatic section adding if editing whole userpage.
*/
function warn()
Line 13:
if(page.length == 0) {page = "Wikipedia"} else { page = "[["+page+"]]" };
var summary = "Your recent edits to " + page ;
if(txt.value.length > 0) txt.value += '\n';
if (document.editform.wpSection==null)
{
txt.value +='== '+summary+' ==\n';
}
document.editform.wpSummary.value = summary;
document.editform.wpMinoredit.checked = true;
if(txt.value.length > 0) txt.value += '\n';
txt.value += msgtext;
document.editform.submit();