MediaWiki:Gadget-purgetab.js

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