注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
?_=1来访问最新页面。https://mobile.moegirl.org.cn/User:%E8%90%8C%E5%A8%98%E7%99%BE%E7%A7%91%C2%B7%E5%A8%9C%E5%A8%9C%E5%A5%87/moeskin.js?_=1Promise.all(
['moeskin.instance', 'moeskin.stores'].map(function (name) {
return new Promise(mw.hook(name).add)
})
).then(function (payload) {
var skin = payload[0]
var stores = payload[1]
var conf = mw.config.get()
var nav = stores.useNavigationStore(skin.pinia)
nav.topbar.push({
id: 'custom-things',
text: '自定义工具',
href: 'javascript:;',
children: [
{
id: 'custom-things-prefixindex',
href: mw.util.getUrl('Special:PrefixIndex/' + conf.wgPageName),
text: '前缀索引',
},
{
id: 'custom-things-whatlinkshere',
text: '链入页面',
href: mw.util.getUrl('Special:WhatLinksHere/' + conf.wgPageName),
},
{
id: 'custom-things-userrights',
text: '用户权限',
href: mw.util.getUrl('Special:UserRights/' + conf.wgUserName),
},
],
})
})