Widget:TalkToc:修订间差异
跳到导航
跳到搜索
无编辑摘要
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
第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 && mw.config.get("wgPageName").startsWith("萌娘百科_talk:讨论版/")) { | |||
$("#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("#collapsible istalk").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' | |||
}] | |||
}); | |||
}); | |||
} | |||
} | } | ||
} | } | ||
第429行: | 第446行: | ||
font-style: italic; | font-style: italic; | ||
} | } | ||
#right-navigation.no-need-to-edit-whole-page ul>li# | #right-navigation.no-need-to-edit-whole-page ul>li#collapsible istalk, | ||
#right-navigation.no-need-to-edit-whole-page ul>li# | #right-navigation.no-need-to-edit-whole-page ul>li#collapsible istalk:visited { | ||
color: #222; | color: #222; | ||
text-decoration: none; | text-decoration: none; |