MediaWiki:Gadget-CleanTableDPL.js

// if ( $( 'table.loot-table' ).length >= 1 ) { 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 ); $( 'table.loot-table > thead > tr > th:eq(1)' ).prepend( domFloatDiv ); $( '.last-edited' ).toggleClass( 'superuser-show sysop-show developer-show' ).toggle; } //