Jump to content

User:Jj137/quickwarn.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jj137 (talk | contribs) at 20:49, 23 February 2008 (bypass redirect). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
//<pre>

function one()
{
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst" + ":uw-vandalism1}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  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}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  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}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  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}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  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}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  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}}" + " ~~" + "~~" + '\n' + ":''If this is a shared [[IP address]], and you didn't make any [[Wikipedia:vandalism|unconstructive]] edits, consider [[Wikipedia:Why create an account?|creating an account]] for yourself so you can avoid further irrelevant warnings.''";
  f.wpSummary.value = "You have been [[Wikipedia:Blocking policy|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)
    {
      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");
    }
}

addOnloadHook(tabs);

//end antivandal script

//