跳转到内容

User:Qinyongr/common.js:修订间差异

计算器百科,非营利的计算器专业知识百科。
Qinyongr留言 | 贡献
创建页面,内容为“// install Wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=...”
 
Qinyongr留言 | 贡献
无编辑摘要
第1行: 第1行:
// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor
$(function () {
importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
    var hist; var url;
+ '&action=raw&ctype=text/javascript');
    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('更新伺服器快取'), '*');
});

2016年2月23日 (二) 16:22的版本

$(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('更新伺服器快取'), '*');
});