Widget:TalkToc:修订间差异

跳到导航 跳到搜索
删除1,605字节 、​ 2021年3月26日 (星期五)
无编辑摘要
imported>=海豚=
无编辑摘要
imported>=海豚=
无编辑摘要
第1行: 第1行:
<noinclude>Only for [[H萌娘讨论: 提案]]</noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script>
<noinclude>Only for [[H萌娘讨论: 讨论版]]</noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script>
window.RLQ = window.RLQ || [];
window.RLQ = window.RLQ || [];
window.RLQ.push(function() {
window.RLQ.push(function() {
第299行: 第299行:
          }).trigger('hashchange');
          }).trigger('hashchange');
          const g = ["sysop", "patroller"];
          const g = ["sysop", "patroller"];
        if (mw.config.get("wgUserGroups").filter(n => g.includes(n)).length === 0) {
           switch (mw.config.get("wgPageName")) {
             case "H萌娘讨论:讨论版":
             case "H萌娘讨论:提案":
           $("#right-navigation").addClass("no-need-to-edit-whole-page").find("#p-views > ul").append('<li id="ca-no-need-to-edit-whole-page-notice" class="collapsible"><span><a href="javascript:void(0);">请勿编辑全文</a></span></li>').find("#ca-edit").on("click", function() {
             var messageDialog = new OO.ui.MessageDialog();
             var windowManager = new OO.ui.WindowManager();
             $("body").append(windowManager.$element);
             windowManager.addWindows([messageDialog]);
             messageDialog.title.$label.html("H萌娘提醒您<br>公共讨论页无需编辑全文");
             messageDialog.message.$label.html("<br>讨论版属于公共讨论页,一般来说无须编辑全文,故我们隐藏了入口。<hr>您可以点击下方标题旁的<b>【编辑】链接</b>来编辑对应段落,也可以点击右上方<b>【添加话题】链接</b>来新增话题。");
             windowManager.openWindow(messageDialog, {
               actions: [{
                 action: 'accept',
                 label: '我知道了',
                 flags: 'primary'
               }]
             });
           });
               break;
           }
         }
        }
        }
      }
      }
第434行: 第412行:
.widgetTalkTocEnable .cbutton {
.widgetTalkTocEnable .cbutton {
    cursor: pointer;
    cursor: pointer;
}
#ca-edit {
   display: none;
}
}
.signInfo {
.signInfo {
第451行: 第432行:
    font-style: italic;
    font-style: italic;
}
}
#right-navigation.no-need-to-edit-whole-page ul>li#collapsible istalk,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-no-need-to-edit-whole-page-notice a,
#right-navigation.no-need-to-edit-whole-page ul>li#collapsible istalk:visited {
#right-navigation.no-need-to-edit-whole-page ul>li#ca-no-need-to-edit-whole-page-notice a:visited {
    color: #222;
    color: #222;
    text-decoration: none;
    text-decoration: none;
第458行: 第439行:
#right-navigation.no-need-to-edit-whole-page ul>li#Wikiplus-Edit-TopBtn,
#right-navigation.no-need-to-edit-whole-page ul>li#Wikiplus-Edit-TopBtn,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-edit,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-edit,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-editTopSection {
#right-navigation.no-need-to-edit-whole-page ul>li#ca-editTopSection{
    display: none;
    display: none;
}
}
匿名用户

导航菜单