无编辑摘要
imported>=海豚= 无编辑摘要 |
imported>Irukaza 无编辑摘要 |
||
| (未显示2个用户的7个中间版本) | |||
| 第10行: | 第10行: | ||
} | } | ||
await mw.loader.using("mw.Api"); | await mw.loader.using("mw.Api"); | ||
mw.loader.using("jquery.tablesorter"); | mw.loader.using("jquery.tablesorter"); | ||
const upperFirstCase = (s) => /^[a-z]/.test(s) ? s.substring(0, 1).toUpperCase() + s.substring(1) : s; | const upperFirstCase = (s) => /^[a-z]/.test(s) ? s.substring(0, 1).toUpperCase() + s.substring(1) : s; | ||
const api = new mw.Api(); | const api = new mw.Api(); | ||
const p = $('<fieldset><legend> | const p = $('<fieldset><legend>贡献分布</legend><p id="queryContributions"> 分名字空间展现 用户贡献分布(编辑数量多的用户 需要较长的时间加载 )<button id="confirmQueryContributions"> √ 开始加载</button><button id="Description">说明</button></fieldset>').insertAfter("#mw-content-text > form").find("#queryContributions"); | ||
p.find("#Description").on("click", async () => { | |||
alert([ | |||
"1.此工具可以使用自动API查询,显示分名字空间的用户贡献分布", | |||
"2.由于其使用了较高的查询频率请求,此工具只能被维护组用户使用", | |||
"3.在主名字空间条目中的编辑次数过百后可以申请成为巡查姬", | |||
].join("\n")); | |||
}); | |||
p.find("#confirmQueryContributions").on("click", async () => { | p.find("#confirmQueryContributions").on("click", async () => { | ||
p.text("加载中……"); | p.text("加载中……"); | ||
| 第44行: | 第48行: | ||
})(); | })(); | ||
const ns = { | const ns = { | ||
0: "", | 0: " 条目", | ||
1: "讨论", | 1: "讨论", | ||
2: "用户", | 2: "用户", | ||