MediaWiki:Gadget-purgetab.js

try { // containerize gadget, to protect other gadgets if this one goes wrong

/* Purge caption button */ $(function {   var hist; var url;   var actionPortlet = "p-cactions";   var purgeText = (mw.config.get('skin') === "vector" ? "Purge (*)" : "*");  if (!(hist = document.getElementById('ca-history') )) return;   if (!(url = hist.getElementsByTagName('a')[0] )) return;   if (!(url = url.href )) return;   mw.util.addPortletLink(actionPortlet, url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'), purgeText, 'ca-purge', 'Purge cache', '*'); });

} catch (e) { // containerize gadget, to protect other gadgets if this one goes wrong // ignore }