Jump to content

User:Jj137/warn-alt.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jj137 (talk | contribs) at 17:43, 21 February 2008 (create). 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)
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 final()
{
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "<div style="padding:8px; border: 3px ridge #88a; background:#f9f9f9;" class="user-warn"> {{{icon|[[Image:Face-sad.svg|left|100px]" + "]}}}Awwww, '''{{subst:" + "BASEPAGENAME}}''', it looks like [[Wikipedia:Vandalism|vandalism]] is all you want to do right now. You have been warned several times now. Any more vandalism from your account{{{{{subst|}}}#if:Article|, like you did to [[:{{{1}}}]]}}, and you could find yourself [[Wikipedia:Blocking policy|blocked]] from editing. Seriously! Instead, why not help improve [[Main_Page| Wikipedia]] by [[Wikipedia:How to edit a page| editing]] constructively?" + "~~" + "~~"</div>";
  f.wpSummary.value = "Final warning for [[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:final()', "final");
    }
}

addOnloadHook(tabs);

//end script

//