MediaWiki:Gadget-ToggleCanon.js

// Toggle Canon button var state = 1; $(function {  $('.hideNC').html($('', {       'class': 'mw-ui-button',       text: $('.hideNC2').text   })).click(function { if(state === 1){ $('.hideNC').html($('', { 'class': 'mw-ui-button', text: $('.showNC').text }));   	$('.cn-list').css("display", "none"); state = 0; }      else { $('.hideNC').html($('', { 'class': 'mw-ui-button', text: $('.hideNC2').text }));		  $('.cn-list').css("display", "block"); state = 1; }     } )});