User:JonTheMon/hideSingleEditor.js

/* */ /**** class hideSingleEditor.js * (c) 2008 by Patrick Westerhoff [poke], modified by JonTheMon */ function hideSingleEditor( userName ) {

if ( userName == null ) userName = window.prompt( 'Enter username:', wgUserName ) || wgUserName || ''; var evaluateText = '//div[@id="bodyContent"]//li[ a[4]/@title = "User:' + userName + '" ]'; var li, liUser = document.evaluate( evaluateText, document, null, 4, null ); var remove = new Array; while( ( li = liUser.iterateNext ) ) {    remove.push( li ); }  while( ( li = remove.pop ) ) {    li.parentNode.removeChild( li ); } void(0);

}

/* start */ new hideSingleEditor; /* */