User:Mailer diablo/csdhelper.js

// CSD helper script // Help with wikipedia article deletion // 2007-02-25 // GFDL // Ben Hallert, modified by Mailer Diablo // // ==UserScript== // @name       DeletionHelper // @namespace  http://en.wikipedia.org/ // @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 = "P1 - Notability " + "P2 - WP:NOT " + "P2U - MySpace " + "P3 - Unverifiable/Hoax " + "P4 - AfD Precedent " + "P4R - Redundant/Duplicate " + "P5 - Specify other reasons " + "--- " + "A7 - Non-notable " + "G1 - Nonsense " + "G11 - Advert/Spam " + "G12 - Blatant copyvio " + "G7 - Self-delete/Self-blank " + "G10 - Attack page " + "A1 - No context " + "A3 - Empty/No content " + "<option value=\'\'>--- " + "<option value=\'WP:CSD, NoSource, Expiring After 7 Days \'>I4 - NoSource " + "<option value=\'WP:CSD, NoCopyrightTag, Expiring After 7 Days \'>I4 - NoCopyrightTag " + "<option value=\'WP:CSD, UnknownCopyrightStatus, Expiring After 7 Days \'>I4 - UnknownCopyrightStatus " + "<option value=\'WP:CSD, Orphaned FairUse Expiring After 7 Days \'>I5 - Orphaned FairUse " + "<option value=\'\'>--- " + "<option value=\'WP:CSD \'>I1 - Duplicate/Superseded Images " + "<option value=\'WP:CSD \'>I3 - Non-Commercial Images " + "<option value=\'WP:CSD \'>R1 - Redirect to nowhere " + "<option value=\'WP:CSD \'>R3 - Implausible typo " + "<option value=\'\'>--- " + "<option value=\'WP:CSD \'>G4 - Reposted XFD " + "<option value=\'WP:CSD \'>G5 - Banned user " + "<option value=\'WP:CSD \'>G8 - Talk page of del'd article " + "<option value=\'WP:CSD \'>I8 - Replaced w/ commons " + "<option value=\'WP:CSD \'>G6 - Housekeeping " + "<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','23'); }                       }                }        }

} void 0