User:Aizag/commons.js
维基百科,自由的 encyclopedia
$(function () {
var hist; var url;
if (!(hist = document.getElementById('ca-history') )) return;
if (!(url = hist.getElementsByTagName('a')[0] )) return;
if (!(url = url.href )) return;
mw.util.addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
wgULS('清除快取'), 'ca-purge', wgULS('清理伺服器快取'), 'p');
});