User:Jj137/quickwarn.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | Documentation for this user script can be added at User:Jj137/quickwarn. |
//<pre>
function one()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-vandalism1}}" + " ~~" + "~~";
f.wpSummary.value = "Notice: [[Wikipedia:Vandalism|Vandalism]].";
}
function two()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-vandalism2}}" + " ~~" + "~~";
f.wpSummary.value = "Caution: [[Wikipedia:Vandalism|Vandalism]].";
}
function three()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-vandalism3}}" + " ~~" + "~~";
f.wpSummary.value = "Warning: [[Wikipedia:Vandalism|Vandalism]].";
}
function four()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-vandalism4}}" + " ~~" + "~~";
f.wpSummary.value = "Final warning for [[Wikipedia:Vandalism|vandalism]].";
}
function fourim()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-vandalism4im}}" + " ~~" + "~~";
f.wpSummary.value = "Only warning for [[Wikipedia:Vandalism|Vandalism]].";
}
function blocked()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst" + ":uw-ablock}}" + " ~~" + "~~";
f.wpSummary.value = "You have been [[WP:BLOCK|blocked]] from editing due to repeated [[Wikipedia:Vandalism|Vandalism]].";
}
function tabs()
{
// Only add for pages with the right string somewhere in the title
if (document.title.indexOf("Editing User talk:1") != -1)
{
addPortletLink('p-cactions', 'javascript:one()', "1");
addPortletLink('p-cactions', 'javascript:two()', "2");
addPortletLink('p-cactions', 'javascript:three()', "3");
addPortletLink('p-cactions', 'javascript:four()', "4");
addPortletLink('p-cactions', 'javascript:fourim()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:2") != -1)
{
addPortletLink('p-cactions', 'javascript:one()', "1");
addPortletLink('p-cactions', 'javascript:two()', "2");
addPortletLink('p-cactions', 'javascript:three()', "3");
addPortletLink('p-cactions', 'javascript:four()', "4");
addPortletLink('p-cactions', 'javascript:fourim()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:3") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:4") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:5") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:6") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:7") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:8") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
if (document.title.indexOf("Editing User talk:9") != -1)
{
addPortletLink('p-cactions', 'javascript:1()', "1");
addPortletLink('p-cactions', 'javascript:2()', "2");
addPortletLink('p-cactions', 'javascript:3()', "3");
addPortletLink('p-cactions', 'javascript:4()', "4");
addPortletLink('p-cactions', 'javascript:4im()', "4im");
addPortletLink('p-cactions', 'javascript:blocked()', "block");
}
}
addOnloadHook(tabs);
//end antivandal script
//