跳转到内容

User:AngeCI/common.js

维基百科,自由的百科全书

这是本页的一个历史版本,由AngeCI留言 | 贡献2012年11月2日 (五) 09:46编辑。这可能和当前版本存在着巨大的差异。

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// [[WP:POPUP]]设置
// [[User:Lupin/popups.js]] - please include this line
importScript("MediaWiki:Gadget-popups.js");
popupDelay = 0.1; // 接近立刻显示
importScript("Wikipedia:維基百科工具/強迫更新/purge.js");

//[[Wikipedia talk:維基百科工具/強迫更新/purge.js]]中的提议
//[[User:Alexsh/purgecache.js]]

addOnloadHook(function () {

    var hist; var url;

    if (!(hist = document.getElementById('ca-history') )) return;

    if (!(url = hist.getElementsByTagName('a')[0] )) return;

    if (!(url = url.href )) return;

    addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),

                   wgULS('清除缓存','清除快取'), 'ca-purge', wgULS('清理服务器缓存','清理伺服器快取'), 'p');

});