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("讨论:讨论版")) {
| | |
| $("#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-no-need-to-edit-whole-page-notice a").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("萌娘百科提醒您<br>公共讨论页无需编辑全文");
| |
| messageDialog.message.$label.html("<br>提问求助区、讨论版属于公共讨论页,一般来说无须编辑全文,故我们隐藏了入口。<hr>您可以点击下方标题旁的<b>【编辑】链接</b>来编辑对应段落,也可以点击右上方<b>【添加话题】链接</b>来新增话题。");
| |
| windowManager.openWindow(messageDialog, {
| |
| actions: [{
| |
| action: 'accept',
| |
| label: '我知道了',
| |
| flags: 'primary'
| |
| }]
| |
| });
| |
| });
| |
| }
| |
| } | | } |
| } | | } |