Jump to content

User:Anonymous Dissident/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Anonymous Dissident (talk | contribs) at 06:49, 5 September 2007 (why not give it a go??). 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.
// [[User:Lupin/popups.js]]

importScript('User:Lupin/popups.js');

importScript('User:AzaToth/twinkle.js');

importScript("User:Lupin/recent2.js");

importScript('User:Tra/userwatchlist.js'); //[[User:Tra/userwatchlist.js]]

//csdreasonhelper - help insert deleted article reasons
 
function csdreasonhelper() {
   if (document.title.indexOf("Confirm deletion -") == 0) {
      var csdReasons = [
                         ['Nonsense', 'Nonsense ([[WP:CSD#G1|CSD G1]])'],
                         ['Test page', 'Test page ([[WP:CSD#G2|CSD G2]])'],
                         ['Vandalism', 'Vandalism ([[WP:CSD#G3|CSD G3]])'],
                         ['Recreated', 'Recreation of deleted material ([[WP:CSD#G4|CSD G4]])'],
                         ['Author blanked', 'Original author blanked the page ([[WP:CSD#G7|CSD G7]])'],
                         ['Talk', 'Talk page of a page that does not exist ([[WP:CSD#G8|CSD G8]])'],
                         ['Attack', 'Attack page ([[WP:CSD#G10|CSD G10]])'],
                         ['Spam', 'Blatant advertising ([[WP:CSD#G11|CSD G11]])'],
                         ['Copyvio', 'Copyright violation ([[WP:CSD#G12|CSD G12]])'],
                         ['No context', 'Very short article providing little or no context ([[WP:CSD#A1|CSD A1]])'],
                         ['No content', 'Contains no content whatsoever, consists only of links elsewhere, or a rephrasing of the title ([[WP:CSD#A3|CSD A3]])'],
                         ['NN bio', 'Article about a person, group of people, band, club, company or website that does not assert the [[Wikipedia:Notability|importance or significance]] of the subject. ([[WP:CSD#A7|CSD A7]])'],
                         ['NN band', 'Article about a band, singer, musician, or musical ensemble that does not assert the [[Wikipedia:Notability|importance or significance]] of the subject. See [[WP:MUSIC]]. ([[WP:CSD#A7|CSD A7]])'],
                         ['NN corp', 'Article about a company or corporation that does not assert the [[Wikipedia:Notability|importance or significance]] of the subject. ([[WP:CSD#A7|CSD A7]])'],
                         ['NN web', 'Article about a web site, blog, online forum, webcomic, podcast, or similar web content that does not assert the [[Wikipedia:Notability|importance or significance]] of the subject. See [[WP:WEB]]. ([[WP:CSD#A7|CSD A7]])'],
                         ['Redir none', 'Redirect to a non-existent page ([[WP:CSD#R1|CSD R1]])'],
                         ['Redir user', 'Redirect to a user page, user talk page, or talk page from the main/article space ([[WP:CSD#R2|CSD R2]])'],
                         ['Redir typo', 'Redirect page resulting from an implausible typo ([[WP:CSD#R3|CSD R3]])'],
                         ['User', 'User page or user subpage requested to be deleted by the user who created it ([[WP:CSD#U1|CSD U1]])'],
                       ];
 
      var csdBreak, csdLabel, csdSelect;
      csdBreak = document.createElement('br');
      csdLabel = document.createTextNode('Select CSD reason: ');
      csdSelect = document.createElement('select');
      csdSelect.id = "csd";
      csdSelect.onchange = new Function("document.getElementById('wpReason').value = this.options[this.selectedIndex].value");
      csdSelect.options[0] = new Option("Clear", "", true, true);
      for (var i = 0; i < csdReasons.length; i++) {
         csdSelect.options[i + 1] = new Option(csdReasons[i][0], csdReasons[i][1], false, false);
      }
      if (document.getElementById("Deletereason")) {
         document.getElementById("Deletereason").appendChild(csdBreak);
         document.getElementById("Deletereason").appendChild(csdLabel);
         document.getElementById("Deletereason").appendChild(csdSelect);
      }
   }
}
 
addOnloadHook(csdreasonhelper);
 
// end csdreasonhelper()