MediaWiki Developer's Handbook/Add JavaScript/Adding a purge tab

Code
JS $)/, '$1purge$2'),	//replace the ?action=history											//part of the href we got from											//the history tab with ?action=purge,											//and set it as the destination			'purge',				//set the text that will appear on the tab			'ca-purge',				//set the internal id for the tab - this is useful for								//referring to it, and positioning tabs relative to one another			'Purge server cache for this page',	//set the mouseover text			'0');					//the access key } if ( wgCanonicalNamespace != "Special" ) addOnloadHook(purge);	//if it's not a special page then hook onto the page loading								//and run the function purge