LLWiki正在建设中,欢迎加入我们

“MediaWiki:Mobile.js”的版本间差异

跳转到导航 跳转到搜索
$(function () {
// 页顶图标
const isSysoprestrictionEdit = mw.config.get('wgUserGroups').includes('sysopwgRestrictionEdit') || [],
isProtectedrestrictionMove = mw.config.get('wgRestrictionEditwgRestrictionMove').length +|| mw.config.get('wgRestrictionMove').length[],
isSysop = mw.config.get('wgUserGroups').includes('sysop'),
isProtected = restrictionEdit.length + restrictionMove.length,
fullurl = '/zh?title=' + mw.config.get('wgPageName'),
isMovable = mw.config.get('wgRestrictionMove')restrictionMove.length === 0 ||
mw.config.get('wgUserGroups').includes(mw.config.get('wgRestrictionMove')restrictionMove[0]);
if(mw.config.get('wgAction') == 'view' && mw.config.get('wgIsArticle')) {
$( (isSysop ? '<li id="page-actions-protect" class="page-actions-menu__list-item"><a id="ca-protect" href="' + fullurl + '&action=protect" data-event-name="menu.protect" role="button" title="更改保护"><i class="fa fa-' + (isProtected? 'unlock' : 'lock') + '"></i></a></li><li id="page-actions-delete" class="page-actions-menu__list-item"><a id="ca-delete" href="' + fullurl + '&action=delete" data-event-name="menu.delete" role="button" title="删除"><i class="fa fa-cut"></i></a></li>' : '') +