User:1xSNAFU/monobook.js

// hide duplicate edits (from de:Benutzer:P.Copp/scripts/hideduplicatecontribs.js if ( wgCanonicalSpecialPageName == "Contributions" ) addOnloadHook( function { var monthsel = document.getElementById( 'month' ); if( !monthsel ) return; var content = document.getElementById( 'bodyContent' ) || document.getElementById( 'mw_contentholder' ) || document.getElementById( 'article' ) var list = content.getElementsByTagName( 'ul' )[0]; var span = document.createElement( 'span' ); span.style.marginLeft = '1em'; span.appendChild( document.createTextNode( 'hide duplicates' ) ); var cbdupl = document.createElement( 'input' ); cbdupl.type = 'checkbox'; span.appendChild( cbdupl ); span.appendChild( document.createTextNode( 'hide latest edits' ) ); var cbtop = document.createElement( 'input' ); cbtop.type = 'checkbox'; span.appendChild( cbtop ); function refreshContribs { var li = list.getElementsByTagName( 'li' ); var titles = {}; for ( var i=0; i < li.length; i++ ) { var link = li[i].getElementsByTagName( 'a' )[0]; var strong = getElementsByClassName( li[i], 'span', 'mw-uctop' ); if ( ( titles[link.title] && cbdupl.checked ) || ( strong.length && cbtop.checked ) ) li[i].style.display = 'none'; else li[i].style.display = 'list-item'; titles[link.title] = true; }	}	cbdupl.onclick = refreshContribs; cbtop.onclick = refreshContribs; monthsel.parentNode.parentNode.appendChild( span ); });