MediaWiki:Gadget-CleanTableDPL.js

// if ( $( 'table.loot-table' ).length >= 1 ) { $( 'table.loot-table > thead > tr > th:eq(1)' ).attr( 'id', 'firstCol' ); var domFloatDiv = document.createElement( 'div' ); domFloatDiv.style = 'display: inline; float: left;'; var domHideLink = document.createElement( 'a' ); domHideLink.title = 'Show "Last Edited" column'; domHideLink.innerText = '→'; domHideLink.onclick = function { if ( $( 'th.last-edited' ).is( ':hidden' ) ) { domHideLink.title = 'Hide "Last Edited" column'; domHideLink.innerText = '←'; }   else { domHideLink.title = 'Show "Last Edited" column'; domHideLink.innerText = '→'; }   $( '.last-edited' ).toggleClass( 'superuser-show sysop-show developer-show' ).toggle; }; domFloatDiv.append( domHideLink ); $( 'th#firstCol' ).prepend( domFloatDiv ); $( '.last-edited' ).toggleClass( 'superuser-show sysop-show developer-show' ).toggle; } //