MediaWiki:Gadget-mwPanel.js:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>=海豚=
(创建页面,内容为“// <pre> $(function() { var items = { "#t-upload": { "t-expandtemplates": '<li id="t-expandtemplates"><a href="' + mw.config.get("wgServer")…”)
 
imported>=海豚=
无编辑摘要
 
(未显示同一用户的5个中间版本)
第4行: 第4行:
      "#t-upload": {
      "#t-upload": {
        "t-expandtemplates": '<li id="t-expandtemplates"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special:%E5%B1%95%E5%BC%80%E6%A8%A1%E6%9D%BF&wpRemoveComments=1&wpInput={{' + mw.config.get("wgPageName") + '}}">展开模板</a></li>',
        "t-expandtemplates": '<li id="t-expandtemplates"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special:%E5%B1%95%E5%BC%80%E6%A8%A1%E6%9D%BF&wpRemoveComments=1&wpInput={{' + mw.config.get("wgPageName") + '}}">展开模板</a></li>',
        "t-Prefixindex": '<li id="t-Prefixindex"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special%3A前缀索引&prefix=' + mw.config.get("wgTitle") + '&namespace=' + mw.config.get("wgNamespaceNumber") + '"> 前缀 页面</a></li>',
        "t-Prefixindex": '<li id="t-Prefixindex"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special%3A前缀索引&prefix=' + mw.config.get("wgTitle") + '&namespace=' + mw.config.get("wgNamespaceNumber") + '"> 查看子 页面</a></li>',
        "t-pagelog": '<li id="t-pagelog"><a href="//zh.moegirl.org/index.php?title=Special:%E6%97%A5%E5%BF%97&page=' + mw.config.get("wgPageName") + '">页面日志</a></li>',
        "t-pagelog": '<li id="t-pagelog"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special:%E6%97%A5%E5%BF%97&page=' + mw.config.get("wgPageName") + '">页面日志</a></li>',
        "t-replacetext": '<li id="t-replacetext" class="sysop-show"><a href="/Special:替换文本">替换文本</a></li>'
        "t-replacetext": '<li id="t-replacetext" class="sysop-show"><a href="/Special:替换文本">替换文本</a></li>'
      }
      }

2021年8月9日 (一) 10:44的最新版本

// <pre>
$(function() {
    var items = {
        "#t-upload": {
            "t-expandtemplates": '<li id="t-expandtemplates"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special:%E5%B1%95%E5%BC%80%E6%A8%A1%E6%9D%BF&wpRemoveComments=1&wpInput={{' + mw.config.get("wgPageName") + '}}">展开模板</a></li>',
            "t-Prefixindex": '<li id="t-Prefixindex"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special%3A前缀索引&prefix=' + mw.config.get("wgTitle") + '&namespace=' + mw.config.get("wgNamespaceNumber") + '">查看子页面</a></li>',
            "t-pagelog": '<li id="t-pagelog"><a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/index.php?title=Special:%E6%97%A5%E5%BF%97&page=' + mw.config.get("wgPageName") + '">页面日志</a></li>',
            "t-replacetext": '<li id="t-replacetext" class="sysop-show"><a href="/Special:替换文本">替换文本</a></li>'
        }
    };
    for (var t in items) {
        var target = $(t);
        for (var i in items[t]) {
            if (!document.getElementById(i)) {
                target.after(items[t][i]);
            }
        }
    }
    mw.loader.addStyleTag("#t-expandtemplates, #t-userlog, .ns-2 #t-pagelog, .ns-3 #t-pagelog, .ns--1 #t-pagelog {display:none;}.ns-10 #t-expandtemplates, .ns-2 #t-userlog, .ns-3 #t-userlog {display:list-item!important;}");
    $('#t-log a').text("用户日志");
});
// </pre>