User:Bradv/hidenavpanel.js

navpanel = { get hidden { return $.cookie('navpanelhidden') == 'true'; },	hide: function { $.cookie('navpanelhidden', 'true'); $("#mw-panel").css('display','none'); $("#content").css('margin-left','0'); $("#left-navigation").css('margin-left','0'); $("#footer").css('margin-left','0'); $("#togglenavpanel").html('►'); },	show: function { $.cookie('navpanelhidden', 'false'); $("#mw-panel").css('display',''); $("#content").css('margin-left',''); $("#left-navigation").css('margin-left',''); $("#footer").css('margin-left',''); $("#togglenavpanel").html('◄'); },	init: function { if ($('#togglenavpanel').length === 0) { $("#p-namespaces").children('ul').prepend(" ◄ "); }		$('#togglenavpanel').click(function {			if (navpanel.hidden) {				navpanel.show;			} else {				navpanel.hide;			}		}); if (navpanel.hidden) { navpanel.hide; }	} }; $(navpanel.init);