MediaWiki:Gadget-Expand.js

// Expand all button var state =1; $(function {  $('.collapse-global').html($('', {       'class': 'mw-ui-button',       text: $('.collapse-global').text   })).click(function { if(state ===0){ $('.mw-collapsible-toggle-expanded').click; state = 1; }      else { $('.mw-collapsible-toggle-collapsed').click; state = 0; }     } )});