User:Poke/monobook.js

/* */ /**** Guild Wars Wiki Tools * Guild Wars Wiki Tools - automaticPatrol v1.3 * Guild Wars Wiki Tools - GuildWiki Switch * (c) 2008 by Patrick Westerhoff [poke] */ if ( window.location.href.indexOf( 'nogwwt' ) < 0 ) addScript( 'User:Poke/GuildWarsWikiTools.js' ); addScript( 'User:Poke/GuildWarsWikiTools/automaticPatrol.js' );

// settings var gwwtWatchlist  = true; var gwwtLoadAfter  = function {   if ( wgAction == 'rollback' && document.getElementById( 'rollback-success' ) != null ) {   window.location.href = wgServer + wgScript + '?title=' + wgPageName; return; } if ( wgNamespaceNumber < 100 ) {   url = 'http://gw.gamewikis.org/wiki/' + wgCanonicalNamespace + ':' + encodeURIComponent( wgTitle ); new PortletArea( 'p-cactions' ).addItem( 'gwwt-gwiki', 'GWiki', url, 'See this page on GuildWiki' ); } gwwtAutomaticPatrol( true ); customizeDeletionReasons; pPersonal = new PortletArea( 'p-personal' ); pPersonal.addItem( 'pt-sandbox', 'my sandbox', '/wiki/User:Poke/sandbox', 'My sandbox', null, document.getElementById( 'pt-preferences' ) ); }

/**** function customizeDeletionReasons.js * (c) 2008 by Patrick Westerhoff [poke] */ function customizeDeletionReasons { var deletionReasons, deletionReasonList; if ( wgAction != 'delete' || !( deletionReasonList = document.getElementById( 'wpDeleteReasonList' ) ) ) return; /** configuration **/ deletionReasons = { '.root' : [ { label: 'other reason', value: 'other' }, { label: 'associated page was deleted', value: 'associated page was deleted' }, { label: 'copyviolation', value: 'copyright violation; content was not available under the GFDL' }, { label: 'empty', value: 'empty or missing basic content'}, { label: 'false information', value: 'false information' }, { label: 'misplaced', value: 'misplaced' }, { label: 'moved', value: 'moved' }, { label: 'redundant', value: 'redundant or otherwise unneeded' } ],   'Guild page deletion' : [ { label: 'guild cleanup', namespace: [ 100 ], value: 'guild cleanup not done within two weeks (guild pages policy)' }, { label: 'disbanded guild', namespace: [ 100 ], value: 'guild has disbanded'}, { label: 'incorrect/invalid guild name', namespace: [ 100 ], value: 'incorrect or invalid guild name' } ],   'Image deletion' : [ { label: 'orphaned image', namespace: [ 6 ], value: 'orphaned image' }, { label: 'user image naming', namespace: [ 6 ], value: 'incorrect user image naming' }, { label: 'guild image naming', namespace: [ 6 ], value: 'incorrect guild image naming' }, { label: 'associated guild page was deleted', namespace: [ 6 ], value: 'associated guild page was deleted' } ],   'Speedy Deletion: General' : [ { label: 'G1: Purely Vandalism', value: 'Speedy Deletion G1: Purely Vandalism' }, { label: 'G2: Test page', value: 'Speedy Deletion G2: Test page' }, { label: 'G3: Editor\'s request', value: 'Speedy Deletion G3: Editor\'s request' }, { label: 'G4: Housekeeping', value: 'Speedy Deletion G4: Housekeeping' }, { label: 'G5: Attack page', value: 'Speedy Deletion G5: Attack page' }, { label: 'G6: Recreation of deleted page', value: 'Speedy Deletion G6: Recreation of deleted page' }, { label: 'G7: Decision or conditional enforcement by arbitration committee', value: 'Speedy Deletion G7: Decision or conditional enforcement by arbitration committee' } ],   'Speedy Deletion: Articles' : [ { label: 'A1: No appropriate information', value: 'Speedy Deletion A1: No appropriate information' }, { label: 'A2: Missing of verifiable source', value: 'Speedy Deletion A2: Missing of verifiable source' }, { label: 'A3: Incontrovertibly unrelated to the Guild Wars Wiki', value: 'Speedy Deletion A3: Incontrovertibly unrelated to the Guild Wars Wiki' } ],   'Speedy Deletion: Redirects' : [ { label: 'R1: Redirect to User/Guild/Talk namespace', value: 'Speedy Deletion R1: Redirect to User/Guild/Talk namespace' }, { label: 'R2: Unnecessary redirect', value: 'Speedy Deletion R2: Unnecessary redirect' }, { label: 'R3: Misleading redirect', value: 'Speedy Deletion R3: Misleading redirect' }, { label: 'R4: Broken redirect', value: 'Speedy Deletion R4: Broken redirect' }, { label: 'R5: Redirect at move destination', value: 'Speedy Deletion R5: Redirect at move destination' } ],   'Speedy Deletion: Images' : [ { label: 'I1: Redundant image', namespace: [ 6 ], value: 'Speedy Deletion I1: Redundant image' }, { label: 'I2: Corrupt or unviewable image', namespace: [ 6 ], value: 'Speedy Deletion I2: Corrupt or unviewable image' } ],   'Speedy Deletion: Categories' : [ { label: 'C1: Empty or unused category', namespace: [ 14 ], value: 'Speedy Deletion C1: Empty or unused category' } ],   'Speedy Deletion: User space' : [ { label: 'U1: User request', namespace: [ 2, 3, 6, 202, 203 ], value: 'Speedy Deletion U1: User request' }, { label: 'U2: Unregistered user', namespace: [ 2, 3, 6, 202, 203 ], value: 'Speedy Deletion U2: Unregistered user' }, { label: 'U3: User image that violates userspace policy', namespace: [ 6 ], value: 'Speedy Deletion U3: User image that violates userspace policy' } ],   'User page/talk page deletion' : [ { label: 'user page for unregistered user', namespace: [ 2 ], value: 'user page for unregistered user' }, { label: 'user page for infinitely blocked user', namespace: [ 2 ], value: 'user page for infinitely blocked user' }, { label: 'user talk page for unregistered user', namespace: [ 3 ], value: 'user talk page for unregistered user' }, { label: 'user talk page for infinitely blocked user', namespace: [ 3 ], value: 'user talk page for infinitely blocked user' } ] }  /** initialize **/ deletionReasonList.innerHTML = ''; deletionReasonList.onchange = function {   document.getElementById( 'wpReason' ).value = ''; this.onchange = null; } for ( var groupName in deletionReasons ) {   var optionNode, optionParent; if ( groupName[0] != '.' ) {     optionParent       = document.createElement( 'optgroup' ); optionParent.label = groupName; }   else optionParent      = deletionReasonList; for ( var i = 0; i < deletionReasons[groupName].length; i++ ) {     if ( deletionReasons[groupName][i].namespace == undefined || deletionReasons[groupName][i].namespace.indexOf( wgNamespaceNumber ) > -1 ) {       optionNode       = document.createElement( 'option' ); optionNode.value = deletionReasons[groupName][i].value; optionNode.appendChild( document.createTextNode( deletionReasons[groupName][i].label ) ); optionParent.appendChild( optionNode ); }   }    if ( groupName[0] != '.' && optionParent.childNodes.length > 0 ) deletionReasonList.appendChild( optionParent ); deletionReasonList.focus; } } /* */