打开/关闭搜索
搜索
打开/关闭菜单
14
6636
42
1.1万
OGAS数据中枢
导航
首页
最近更改
随机页面
特殊页面
上传文件
少女前线
简介
战术人形
装备图鉴
BGM
任务
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
注册
登录
查看“︁MediaWiki:Common.js”︁的源代码
MediaWiki界面页面
更多操作
←
MediaWiki:Common.js
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
管理员
此页面为本wiki上的软件提供界面文本,并受到保护以防止滥用。 如欲修改所有wiki的翻译,请访问
translatewiki.net
上的MediaWiki本地化项目。
您无权编辑此JavaScript页面,因为编辑此页面可能会影响所有访问者。
您可以查看和复制此页面的源代码。
$(function() { function getTooltip() { var $tip = $('#custom-notetip-popup'); if (!$tip.length) { $tip = $('<div id="custom-notetip-popup"></div>').appendTo('body'); } return $tip; } mw.loader.using('jquery.makeCollapsible').then(function() { mw.hook('wikipage.content').add(function($content) { $content.find('.mw-collapsible').makeCollapsible(); $content.on('mouseenter', '.mw-custom-notetip', function() { var text = $(this).attr('data-notetip'); if (!text) return; var $tooltip = getTooltip(); $tooltip.text(text).show(); var rect = this.getBoundingClientRect(); var tipHeight = $tooltip.outerHeight(); var tipWidth = $tooltip.outerWidth(); var scrollY = window.scrollY; var scrollX = window.scrollX; var top = rect.top - tipHeight < 20 ? scrollY + rect.bottom + 10 : scrollY + rect.top - tipHeight - 10; var left = scrollX + rect.left + (rect.width / 2) - (tipWidth / 2); var winWidth = $(window).width(); if (left < 10) left = 10; if (left + tipWidth > winWidth - 10) left = winWidth - tipWidth - 10; $tooltip.css({ top: top + 'px', left: left + 'px' }); }).on('mouseleave', '.mw-custom-notetip', function() { getTooltip().hide(); }); $content.find('.Tabs:not(.tabs-initialized)').each(function() { var $tabsContainer = $(this); var $tabItems = $tabsContainer.find('> .Tab'); if (!$tabItems.length) return; var $labelWrapper = $('<div class="TabLabel"></div>'); var $contentWrapper = $('<div class="TabContent"></div>'); $tabItems.each(function(i) { var $item = $(this); var $label = $item.find('> .TabLabelText'); var $contentBox = $item.find('> .TabContentText'); if (i === 0) { $label.addClass('selected'); $contentBox.addClass('selected'); } $label.on('click', function() { $labelWrapper.find('.TabLabelText').removeClass('selected'); $contentWrapper.find('.TabContentText').removeClass('selected'); $(this).addClass('selected'); $contentBox.addClass('selected'); }); $labelWrapper.append($label); $contentWrapper.append($contentBox); }); $tabsContainer.empty().append($labelWrapper).append($contentWrapper).addClass('tabs-initialized'); }); $content.find('.nav-pill-btn').on('click', function() { var match = $(this).attr('class').match(/mw-customtoggle-game(\d+)/); if (!match) return; var $myContent = $('#mw-customcollapsible-game' + match[1]); if ($myContent.hasClass('mw-collapsed')) { $('.nav-pill-content:not(.mw-collapsed)').each(function() { var otherNum = this.id.replace('mw-customcollapsible-game', ''); $('.mw-customtoggle-game' + otherNum).first().trigger('click'); }); } }); }); }); });
返回
MediaWiki:Common.js
。
查看“︁MediaWiki:Common.js”︁的源代码
MediaWiki界面页面