Jump to content

User:MER-C/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MER-C (talk | contribs) at 12:20, 1 September 2006. 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><nowiki>
function inc (file) {
  var lt = String.fromCharCode(60);
  var gt = String.fromCharCode(62);
  document.writeln(lt+'script type="text/javascript" src="/w/index.php?title='+file+'&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"'+gt+lt+'/script'+gt);
}

inc("User:VoA/monobook.js");

// speedy deletion warning

function dbwarn()
{
  var title = document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free'));
  if (title.indexOf("Editing User talk") != -1)
  {
    var type = prompt("Enter page up for speedy deletion");
    var f = document.editform, t = f.wpTextbox1;
    t.value = t.value + "\n ==Speedy deletion warning== \n" + {{subst:nn-warn|" + type + "}} ~~~~ \n" ;
    f.wpSummary.value = "User notice: nn-warn";
    f.wpSave.click();
    return;
  }
}

addOnloadHook(function()
{
  if (document.title.indexOf("Editing User talk:") != -1)
  {
    var c1 = document.getElementById('column-one'); 
    var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
    tabs.appendChild(tnaddlilink('javascript:dbwarn()',"csd warn"));
  }
});

//</nowiki></pre>
// [[Category:RC scripted users]]