User:Chairboy/csdhelper.greasemonkey.js

Simple script to add a click-menu to the article delete screen for administrators to make it easy to leave useful speedy delete criteria. Saves time and is friendlier to the article authors who may not get meaningful information out of 'a7' or 'db-context' as the specified reason. To use this in Greasemonkey, just copy the code below into a file named csdhelper.user.js on your computer, then drag the file into your browser. Greasemonkey should offer to install it. // CSD helper script // Help with wikipedia article deletion // 2007-04-24 // GFDL // Ben Hallert // // ==UserScript== // @name       CSDHelper // @namespace  http://hallert.net/ // @description Provide a dropdown menu of CSD criteria in delete pages on Wikipedia. Admins only. // @include    http://en.wikipedia.org/* // ==/UserScript==

if (document.getElementById('deleteconfirm')) {       var parent_form = document.getElementById('deleteconfirm'); var par        = document.getElementById('wpReason'); var newhelper  = document.createElement('select'); newhelper.setAttribute('id','csdhelper'); newhelper.setAttribute('onChange','document.getElementById(\'wpReason\').value = document.getElementById(\'csdhelper\').value;'); newhelper.innerHTML = "Select a CSD " + "A1 - No context " + "A3 - No content " + "A7 - Non-notable " + "--- " + "G1 - Nonsense " + "G4 - Reposted XFD " + "G5 - Banned user " + "G6 - Housekeeping " + "G7 - Author requested del " + "G8 - Talk page of del'd article " + "G10 - Attack " + "G11 - WP:SPAM " + "G12 - Blatant Copyvio " + "--- " + "R1 - Redirect to nowhere " + "<option value=\'WP:CSD Images, subsection 1 - Redundant copy. This image is a redundant copy in the same format and or lower resolution.\'>I1 - Redundant (non-commons) image " + "<option value=\'WP:CSD Images, subsection 3 - Improper license. Must be WP:COPYRIGHT compliant.\'>I3 - Improper license " + "<option value=\'WP:CSD Images, subsection 4 - Lack of any licensing information. Images without licenses for 7 days are removed without warning.\'>G4 - Missing license for 7+ d " + "<option value=\'WP:CSD Images, subsection 8 - Replaced by a properly licensed version on Wikimedia Commons.\'>I8 - Replaced w/ commons " + "<option value=\'WP:CSD Categories, subsection 1 - Empty categories with no actual content.\'>C1 - Empty category " + "<option value=\'WP:CSD User pages, subsection 1 - User request to delete own subpage.\'>U1 - Userpage del request " + "<option value=\'WP:CSD User pages, subsection 2 - Nonexistant user.\>U2 - Nonexistant user " + "<option value=\'WP:CSD User pages, subsection 3 - Fair use galleries in user space are not allowed.\'>U3 - Fair use gallery " + "<option value=\'WP:CSD Templates, subsection 1 - Divisive or inflammatory template.\'>T1 - Fight template ";

if(parent_form) {               var firsttable  = parent_form.getElementsByTagName('table')[0]; if(firsttable) {                       var firsttbody  = firsttable.getElementsByTagName('tbody')[0]; if(firsttbody) {                               var firstrow    = firsttbody.getElementsByTagName('tr')[0]; if(firstrow) {                                       var newcell     = firstrow.insertCell(0); newcell.setAttribute('rowspan','3'); newcell.appendChild(newhelper); newhelper.setAttribute('size','24'); }                       }                }        }

} void 0