“MediaWiki:Common.css”与“MediaWiki:Common.js/edit.js”:页面之间的差异

H萌娘,万物皆可H的百科全书!
(页面间差异)
跳到导航 跳到搜索
imported>=海豚=
无编辑摘要
 
imported>=海豚=
无编辑摘要
 
第1行: 第1行:
/* 
/* Any JavaScript here will be loaded for all users on edit page load. */
* 放置于这里的CSS将应用于所有皮肤
$(function() {
* 请尊重版权,以下代码除非注明均是管理员手敲出来的!!!复制需要注明源自H萌娘,并且附上URL地址http://www.hmoegirl.com/MediaWiki:Common.css
   var wpSummary = $('[name="wpSummary"]');
* 版权协定:知识共享 署名-非商业性使用-相同方式共享 3.0
    // $(".mw-summary-preset-item a").closest('.oo-ui-fieldLayout-header').width($('#wpSummary').width());
* 复制之后请把图片换成自己网站上URL地址!
    $(".mw-summary-preset-item a").on("click", function() {
*/
      wpSummary.val(wpSummary.val() + " " + $(this).text());
/*
     wpSummary.focus();
* vector界面、主标题字体定制,参考Github添加了Emoji支持
     return false;
* 更改后要同步到 [[MediaWiki:Gadget-GothicMoe.css]]
   });
*/
/*全站字型扩大*/
body {
   font-size: 110%;
}
.oo-ui-window-content {
    font-size: 89.3%;
}
/* 侧边栏、顶部栏、页脚 */
div#mw-page-base {
   height: 104px;
}
#left-navigation,
#right-navigation {
   margin-top: 60px;
}
div#mw-head div.vectorMenu h4 {
   height: 1.9em;
   margin-bottom: 0;
   padding-top: 1.25em;
   padding-bottom: 0;
   padding-right: 0.5em;
}
div#mw-panel div.portal {
   padding-bottom: 0.7em;
   padding-top: 0.4em;
}
#mw-panel #p-logo {
   width: 170px;
    margin-left: -0.05em;
   padding-top: 0.3em;
}
#mw-panel #p-logo .mw-wiki-logo {
   width: 175px;
}
div#mw-panel {
   font-size: 20px;
   /* mw-panel的宽度是10em,改了font-size以后也需要修改一下 */
   width: 11.6rem;
   margin-left: -0.1em;
}
.clear-div {
   clear: both;
}
.uls-trigger{
   display: none;
}
#mw-panel .portal .body li a:visited {
  color: #0648AF;
}
div#catlinks {
background-color: rgba(251,251,251,0.3);
}
/* 标题字型调整*/
#firstHeading {
   font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
   font-weight: 500;
   font-size: 175%;
   padding-bottom: 6px;
}
.h2{
   font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
   font-weight: 500;
}
.mw-content-ltr h4{
      padding-left: 0.5em;
}
/* 副标题 */
#siteSub {
   display: inline;
   font-size: 100%;
   font-weight: 400; /* 400 = normal */
   font-style: normal;
   text-align: right;
   padding-top: 11px;
}
/* MW自带10em宽度,应该是留给测试链接的吧萌百没有就去掉 */
#p-personal ul {
   padding-left: 0;
}
/* 搜索框 */
#simpleSearch {
  max-width: 220px;
  background-image: none;
  border-radius: 20px;
  padding: 0px 10px;
  opacity: 0.625;
  display: flex;
  align-items: center;
  transition: width 0.4s;
}
#simpleSearch:hover {
  border-color: var(--theme-color) !important;
}
#simpleSearch:focus-within {
  width: 240px;
}
#searchInput::-webkit-input-placeholder {
  color: var(--theme-color) !important;
}
#searchInput::input-placeholder {
  color: var(--theme-color) !important;
}
#simpleSearch #searchButton {
  right: 8px !important;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E %3Cpath d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'%3E%3C/path%3E %3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E %3Cpath d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'%3E%3C/path%3E %3C/svg%3E");
  background-color: var(--theme-color) !important;
  background-image: none !important;
  background-color: var(--theme-color) !important;
  width: 20px !important;
  height: 20px !important;
  padding-block-start: 21px;
}
#simpleSearch:hover>#searchButton {
  animation: shake 0.4s 1 forwards;
}


#p-search {
    // .wikiEditor-ui-controls 色修
   float: left;
    $('.wikiEditor-ui-controls').css('background-color', $('#content').css('background-color'));
   margin-right: 0.5em;
   margin-left: 0.6em;
   margin-top: 0.1em;
}
@keyframes shake {
  0%,
  50% {
    transform: rotate(5deg) scale(1.05);
  }
  25%,
  75% {
   transform: rotate(-5deg) scale(1.05);
  }
  100% {
   transform: rotate(0deg) scale(1.05);
  }
}
.oo-ui-actionFieldLayout-input {
   font-size: 95%;
}
/* 右上通知处奇怪的数字移除 */
#pt-notifications-alert .mw-echo-notifications-badge,
#pt-notifications-notice .mw-echo-notifications-badge {
   text-indent: -99999px;
}
#pt-notifications-alert .mw-echo-notifications-badge:after,
#pt-notifications-notice .mw-echo-notifications-badge:after {
   text-indent: 0;
}
/* 链接显示效果 */
a:hover {
  text-decoration: none;
  color: #2a4b8d!important;
}
a, a:visited {
   text-decoration: none;
   color: #3366cc;
}
/* 被点过的外部链接不变 。采取和默认皮肤相同写法,以便override */
.mw-body a.external:visited {
   color: #3366cc;
}
/* 斜体字右边距加大看以防止文字挤在一起 */
#mw-content-text i {
   margin-right: 3px;
}
/* Extension:MultimediaViewer的半透明化 改  */
.mw-mmv-overlay {
   position: fixed;
   top: 0;
    left: 0;
   right: 0;
   bottom: 0;
   background-color: rgba(0,0,0,0.8);
   opacity: 0.73;
}
body.mediawiki.mw-mmv-lightbox-open #mw-page-base,
body.mediawiki.mw-mmv-lightbox-open #mw-head-base,
body.mediawiki.mw-mmv-lightbox-open #mw-navigation,
body.mediawiki.mw-mmv-lightbox-open #content,
body.mediawiki.mw-mmv-lightbox-open #footer,
body.mediawiki.mw-mmv-lightbox-open #globalWrapper {
   display: inherit;
}
body.mediawiki.mw-mmv-lightbox-open > *  {
   display: inherit;
}
body.mediawiki.mw-mmv-lightbox-open > script,
body.mediawiki.mw-mmv-lightbox-open > style {
   display: none;
}
body.mediawiki.mw-mmv-lightbox-open {
   overflow: hidden;
}
body .mw-mmv-wrapper {
   position: fixed;
}
/* mutilmediaViewer 信息栏修复 */
.mw-mmv-image-metadata-column.mw-mmv-image-metadata-desc-column {
   width: 30%;
}
.mw-mmv-image-metadata-column.mw-mmv-image-metadata-links-column {
   width: 70%;
   max-width: 70%;
}
ul.mw-mmv-image-links li {
   float: left;
   padding: .3em 1em;
}
div.mw-mmv-image-desc-div,
div.mw-mmv-image-links-div{
   display:block
}
div.metadata-panel-is-closed .mw-mmv-image-links li.mw-mmv-license-li {
   height:inherit;
   line-height:inherit;
}
/* 通用圆角框 */
.common-box {
   padding: .2em .4em;
   border: 1px solid #ddd;
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
   -khtml-border-radius: 10px;
   -o-border-radius: 10px;
   -webkit-box-shadow: #666 0 2px 3px;
   -moz-box-shadow: #666 0 2px 3px;
   border-radius: 10px;
   box-shadow: #666 0 2px 3px;
}
/* 数据表格 */
.mw-datatable.TablePager {
   width: 100%;
   table-layout: fixed;
   word-wrap: break-word;
}
/* 隐藏首页标题、空行、分类、讨论、查看源代码tab */
.page-Mainpage h1.firstHeading,
.page-Mainpage #siteSub,
.page-Mainpage #contentSub,
.page-Mainpage #ca-viewsource,
.page-Mainpage #siteNotice,
.page-Mainpage #ca-talk,
.page-Mainpage #catlinks {
   display: none;
}
/* 黑幕模板配合CSS */
/* 把这几行单独拎出来写,否则会被Firefox合并到“.heimu a”这条规则,然后又被上面的“点过外链不变色”规则override */
span.heimu a.external,
span.heimu a.external:visited,
span.heimu a.extiw,
span.heimu a.extiw:visited {
   color: #252525;
}
.heimu,
.heimu a,
a .heimu,
.heimu a.new {
   background-color: #252525;
   color: #252525;
   text-shadow: none;
}
body:not(.heimu_toggle_on) .heimu:hover,
body:not(.heimu_toggle_on) .heimu:active,
body:not(.heimu_toggle_on) .heimu.off {
   transition: color .13s linear;
   color: white;
}
body:not(.heimu_toggle_on) .heimu:hover a,
body:not(.heimu_toggle_on) a:hover .heimu,
body:not(.heimu_toggle_on) .heimu.off a,
body:not(.heimu_toggle_on) a:hover .heimu.off {
   transition: color .13s linear;
   color: lightblue;
}
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off {
   transition: color .13s linear;
   color: #BA0000;
}
/* 目录样式 */
#toc{
  padding: 0.8em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: rgba(250,250,250,0.8);
}
/* 导航条(完全没有apple风格的apple风面包屑orz) 来源:http://www.jankoatwarpspeed.com/examples/breadcrumb/ */
#breadcrumb {
   background-image: url(//img.moegirl.org/breadcrumb/bc_bg.png);
   color: red;
   border: solid 1px #cacaca;
   border-radius: 10px;
   overflow: hidden;
}
#breadcrumb span {
   float: left;
   padding-left: 10px;
}
#breadcrumb a {
   display: block;
   background: url(//img.moegirl.org/breadcrumb/bc_separator.png) no-repeat right;
   padding-right: 15px;
   color: #454545;
}
#breadcrumb a:hover {
   color: #35acc5;
}
/* info类模板 */
.infobox {
  margin:0 auto;
}
.infobox1 {
  margin:0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.10);
  border-radius: 5px;
  overflow: hidden;
  border: 0.5px solid #ddd;
}
.infobox2 {
  margin-top: 0.4em ;
  margin-left: 1em;
  padding: 0.2em;
  float: right;
  clear: right;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(251,251,251,0.8);
}
.infobox3 {
  margin:0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.10);
  border-radius: 15px;
  overflow: hidden;
}
.infoBoxTitle {
   margin: 3px auto;
   padding: 0;
   text-align: center;
   font-weight: 700;
}
.infoBoxIcon {
   display: table-cell;
   padding: 2px 0 2px .5em;
   vertical-align: middle;
}
.infoBoxText {
   display: table-cell;
   padding: .25em .5em .25em 1.3em;
   width: 100%;
   vertical-align: middle;
}
.infoBoxContent {
  padding: 0.6em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(251,251,251,0.7);
}
.infoBoxBelow {
   margin: 0 auto;
   padding: 0;
   text-align: center;
}
.infoBoxYellow {
  padding: 0.5em;
  background: rgba(255,255,245);
}
.infoBoxRed {
  padding: 0.5em;
  background: rgba(258,240,245);
}
.infoBoxBlue {
  padding: 0.4em;
  background: rgba(240,248,255);
}
.infoBoxPurple {
  padding: 0.4em;
  background: rgba(248,248,255);
}
.infoBoxGreen {
  padding: 0.5em;
  background: rgba(245,255,250);
}
.infoBoxOrange {
  padding: 0.5em;
  background: rgba(250,240,230);
}


/*评论区*/
   // 编辑提示检查
.comment-container-top>div:not(.comment-thread) {
   if ($(".mw-summary-preset")[0]) {
  background-color: rgba(244, 196, 48, 0.8) !important;
     $(".CheckNewSectionOn").hide();
  color: white !important;
   } else {
  font-weight: bolder !important;
     $(".CheckNewSectionOff").hide();
}
     $('.headerInputbox a[href*="preload=Template%3A权限申 %2F"]').attr("target", "_self");
.comment-thread.comment-popular {
  background-color: rgba(244, 196, 48, 0.1) !important;
}
.comment-body textarea, .comment-preview {
background: rgba(251,251,251,0.7);
}
.comment-toolbar {
background: rgba(251,251,251,0.8);
}
/* wikitable MD化 */
table.wikitable {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  border-radius: 4px;
  overflow: hidden;
}
/* 回到顶部 */
.backToTop {
   display: none;
   width: 20px;
   padding: 5px 0;
   background-color: #000;
   color: #fff;
   font-size: 12px;
   text-align: center;
   position: fixed;
   _position: absolute;
   right: 0;
   bottom: 100px;
   _bottom: "auto";
   cursor: pointer;
   opacity: .6;
   filter: Alpha(opacity=60);
   z-index: 73;
}
.mw-mmv-lightbox-open .backToTop {
   display: none !important;
}
/* 隐藏编辑页面中的返回顶部按钮 */
.page-Mainpage .backToTop,
.action-edit .backToTop,
.action-submit .backToTop {
  display: none !important;
}
/* 信息模板的css */
.infotemplatebox {
   float: right;
   width: 250px;
   font-size: 100%;
   margin: 1em 0 1em 1em;
   background: #f9f9f9;
   border: 1px #999 solid;
   border-collapse: collapse;
   word-break: break-all;
   clear: right;
}
/* 编辑区样式 */
.my-buttons {
   padding: .6em;
}
.my-buttons a {
   text-decoration: none;
   border: 1px #069 outset;
   padding: .1em;
}
.my-buttons a:hover,
.my-buttons a:active {
   border-style: inset;
}
#wpTextbox1.mw-editfont-monospace{
font-size: 13.5px;
height: 450px;
}
#msupload-container.start-loading{
display:none;
}
#msupload-dropzone {
   padding: 3px;
   height: 19px;
   font-size: small;
}
/* 解决pre不换行的问题 */
pre {
   white-space: pre-wrap; /* CSS-3 */
   white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
   white-space: -pre-wrap; /* Opera 4-6 */
   white-space: -o-pre-wrap; /* Opera 7 */
   word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/* 页面底部导航框(2011年8月16日引自中文维基)( 所谓大家族模板) */
table.navbox {
   clear: both;
   margin: auto;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
   padding: 1px;
   text-align: center;
   width: 100%;
}
table.navbox+table.navbox {
   margin-top: -1px;
}
.navbox-title,
.navbox-abovebelow,
table.navbox th {
   padding-left: 1em;
   padding-right: 1em;
   text-align: center;
}
.navbox-group {
   font-weight: 700;
   padding-left: 1em;
   padding-right: 1em;
   white-space: nowrap;
}
.navbox,
.navbox-subgroup {
   background: none repeat scroll 0 0 #fdfdfd;
}
.navbox-list {
   border-color: #fdfdfd;
}
.navbox-title,
table.navbox th {
   background: none repeat scroll 0 0 #a5e4a5;
}
.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title {
   background: none repeat scroll 0 0 #c0ecc0;
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
   background: none repeat scroll 0 0 #e6f6e6;
}
.navbox-even {
   background: none repeat scroll 0 0 #f5fcf5;
}
.navbox-odd {
   background: none repeat scroll 0 0 transparent;
}
.collapseButton {
   float: right;
   font-weight: 400;
   text-align: right;
   width: auto;
}
.navbox .collapseButton {
   width: 6em;
}
/* Fix by case : Rev 1327309 ([[Special:Permalink/1327309]])
   Address alignment issue of nested tabs in Navbox */
.navbox .TabLabel {
   text-align: left;
}
/* Tabs */
.tab .TabLabelText {
   border-top: 3px solid transparent;
   padding: 1px;
   background: #fff;
   border-left: 1px solid transparent;
   border-right: 1px solid transparent;
   cursor: pointer;
   flex: none;
}
.tab .TabLabel {
   z-index: 2;
   position: relative;
   -webkit-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   -o-user-select: none;
   user-select: none;
   display: flex;
   flex-wrap: wrap;
}
.tab .TabLabelText.selected {
   border-top: 3px solid green;
   padding: 1px;
   background: white;
   border-left: 1px solid #aaa;
   border-right: 1px solid #aaa;
}
.tab .TabContent {
   background: white;
   padding: 20px 30px;
   position: relative;
   z-index: 1;
   border: 1px solid #aaa;
}
.tab .TabContentText {
   display: none;
}
.tab .TabContentText.selected {
   display: block;
}
.Tabs .Tab {
   border-bottom: 1px solid #aaa;
}
.Tabs .Tab:first-child {
   border-top: 1px solid #aaa;
}
.Tabs .Tab .TabLabelText {
   padding: 7px;
}
.Tabs .Tab .TabContentText {
   padding: 3px;
}
/* 表格宽度 */
.wikitable {
   max-width: 100%;
}
/* 缩略图居中*/
.thumb.tcenter {
   float: none;
   clear: both;
   display: block;
   margin: 0 auto;
}
/* 图片外框圆角化 */
.thumbinner {
  box-shadow: #666 0 0.4px 1px!important;
  border-radius: 5px!important;
  overflow: hidden!important;
}
/* 用户页没有分类! */
body.ns-2 div#catlinks {
   display: none !important;
}
/* 仅手机版显示支持 */
.mobileonly {
   display: none !important;
}
/* 编辑 求 */
.editRequest {
   text-align: center;
   border: 1px solid #ddd;
   border-radius: 3px;
   margin:1em 2.5em;
   padding: 1em;
   background: white;
}
.editRequest .newComment {
   white-space: nowrap;
   background: #347bff;
   color: #fff;
   border: 1px solid #347bff;
   text-shadow: 0 1px rgba(0,0,0,0.1);
   font-family: inherit;
   font-size: 1em;
   min-width: 4em;
   max-width: 28.75em;
   padding: .5em 1em;
   margin: 0;
   border-radius: 2px;
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
   -webkit-appearance: none;
   zoom: 1;
   vertical-align: middle;
   text-align: center;
   font-weight: bold;
   cursor: pointer;
}
/* 注释里的列表 */
.reference-text > ul.listInRef,
.reference-text > ol.listInRef {
   margin: -1.5em 0 0 2em;
}
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
/* 以下内容已被萌百格式化,注释已被翻译 */
.container {
   position: relative;
   width: 100%;
   max-width: 960px;
   margin: 0 auto;
   padding: 0 20px;
   box-sizing: border-box;
}
.div,
.divs,
.column,
.columns {
   width: 100%;
   float: left;
   box-sizing: border-box;
}
/* 适用于屏幕像素宽度大于400px的设备 */
@media (min-width: 400px) {
   .container {
     width: 85%;
     padding: 0;
    }
    }
}
 
/* 适用于屏幕像素宽度大于800px的设备 */
   if ($(".AbusefilterWarningNoHttp")[0]) {
@media (min-width: 800px) {
      $("#wpTextbox1").val($("#wpTextbox1").val().replace(/http:\/\/([a-z\d]+\.bilibili\.[a-z\d]+)/ig, "https://$1"));
   .container {
     width: 80%;
   }
   .div,
   .divs,
   .column,
   .columns {
     margin-left: .3%;
   }
   .div:first-child,
   .divs:first-child,
   .column:first-child,
   .columns:first-child {
     margin-left: 0;
   }
   .one.div,
   .one.divs {
      width: 100%;
     margin-left: 0;
   }
   .two.divs {
     width: 49.85%;
   }
   .three.divs {
     width: 33.1333333333%;
   }
   .four.divs {
     width: 24.775%;
   }
   .five.divs {
     width: 19.76%;
   }
   .six.divs {
     width: 16.4166666667%;
   }
   .seven.divs {
     width: 14.0285714286%;
   }
   .eight.divs {
     width: 12.2375%;
   }
   .nine.divs {
     width: 10.8444444444%;
   }
   .ten.divs {
     width: 9.73%;
   }
   .eleven.divs {
     width: 8.81818181818%;
   }
   .twelve.divs {
     width: 8.05833333333%;
   }
   .one.column,
   .one.columns {
     width: 8.05833333333%;
   }
   .two.columns {
     width: 16.4166666667%;
   }
   .three.columns {
     width: 24.775%;
   }
   .four.columns {
     width: 33.1333333333%;
   }
   .five.columns {
     width: 41.4916666667%;
   }
   .six.columns {
     width: 49.85%;
   }
   .seven.columns {
     width: 58.2083333333%;
   }
   .eight.columns {
     width: 66.5666666667%;
   }
   .nine.columns {
     width: 74.925%;
   }
   .ten.columns {
     width: 83.2833333333%;
   }
   .eleven.columns {
     width: 91.6416666667%;
   }
   .twelve.columns {
     width: 100%;
     margin-left: 0;
   }
   .one-third.column {
     width: 33.1333333333%;
   }
   .two-thirds.column {
     width: 66.5666666667%;
   }
   .one-half.column {
     width: 49.85%;
   }
   /* Offsets设置 */
   .offset-by-one.column,
   .offset-by-one.columns {
     margin-left: 8.66666666667%;
   }
   .offset-by-two.column,
   .offset-by-two.columns {
     margin-left: 17.3333333333%;
   }
   .offset-by-three.column,
   .offset-by-three.columns {
     margin-left: 26%;
   }
   .offset-by-four.column,
   .offset-by-four.columns {
     margin-left: 34.6666666667%;
   }
   .offset-by-five.column,
   .offset-by-five.columns {
     margin-left: 43.3333333333%;
   }
   .offset-by-six.column,
   .offset-by-six.columns {
     margin-left: 52%;
   }
   .offset-by-seven.column,
   .offset-by-seven.columns {
     margin-left: 60.6666666667%;
   }
   .offset-by-eight.column,
   .offset-by-eight.columns {
     margin-left: 69.3333333333%;
   }
   .offset-by-nine.column,
   .offset-by-nine.columns {
     margin-left: 78.0%;
   }
   .offset-by-ten.column,
   .offset-by-ten.columns {
     margin-left: 86.6666666667%;
   }
   .offset-by-eleven.column,
   .offset-by-eleven.columns {
     margin-left: 95.3333333333%;
   }
   .offset-by-one-third.column,
   .offset-by-one-third.columns {
     margin-left: 34.6666666667%;
   }
   .offset-by-two-thirds.column,
   .offset-by-two-thirds.columns {
     margin-left: 69.3333333333%;
   }
   .offset-by-one-half.column,
   .offset-by-one-half.columns {
     margin-left: 52%;
    }
    }
}
/*
* 感谢{{萌百|User:Great Brightstar}}的贡献,源码来自[[special:diff/834104]]
* 以下是原注释:
* 在这里使用 font-feature-settings 属性会让使用“lang”标签的元素强制使用 OpenType 技术显示本地化的变体字(通过激活 locl 标签,即便浏览器本身不直接激活)。
* 如果你使用思源黑体(非 CN、JP、KO、TW 版)、Noto Sans CJK 显示文字的话就有可能看到效果。
* 关于上述这个 CSS 属性的用法,参阅:https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings 注意:此文引用的 OpenType Feature Tags list 同样需要关注。
* 如有任何问题请即刻禁用之
* Nbdd0121: 将原来的[lang]改为span[lang],这样就不会影响非{{lang}}的[lang]了 (e.g. div#mw-content-text)
*/
span[lang] {
   font-family: initial;
   font-feature-settings: "locl" on;
   -webkit-font-feature-settings: "locl" on;
}
[style*="font"] span[lang] {
   font-family: inherit;
}
/* 日语斜体*/
@font-face {
   font-family: JapaneseItalic;
   src: local(meiryo);
}
/*
i span[lang=ja i],
span[lang=ja i] i,
[style*=italic i] span[lang=ja i],
span[lang=ja i] [style*=italic i] {
   font-family: JapaneseItalic;
}
[style*="font"] i span[lang=ja i],
[style*="font"] span[lang=ja i] i,
[style*="font"] [style*=italic i] span[lang=ja i],
[style*="font"] span[lang=ja i] [style*=italic i] {
   font-family: inherit;
}
*/


/* 折叠表格的定位处理
   // Customized File Insertion dialog
body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child {
   // Copyright 2017 The Little Moe New LLC. All rights reserved.
   position: relative;
   mw.loader.using(["oojs", "oojs-ui"]).then(function() {
   padding-right: 0;
     $("#wpTextbox1").on("wikiEditor-toolbar-doneInitialSections", function() {
}
       function FileInsertionDialog(config) {
body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child {
         FileInsertionDialog.super.call(this, config);
   position: relative;
       }
   padding-left: 4em;
       OO.inheritClass(FileInsertionDialog, OO.ui.ProcessDialog);
   padding-right: 4em;
       // Name
}
       FileInsertionDialog.static.name = "fileInsertionDialog";
body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
       FileInsertionDialog.static.title = mw.msg("wikieditor-toolbar-tool-file-title");
   margin: 0 .5em;
       FileInsertionDialog.static.actions = [{
}
         flags: "primary",
body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
         label: mw.msg("wikieditor-toolbar-tool-file-insert"),
   position: absolute;
         action: "insert"
   right: .5em;
       }, {
   top: .15em;
         flags: "safe",
   float: none;
         label: mw.msg("wikieditor-toolbar-tool-file-cancel")
   margin: 0;
       }];
} */
       // Initialization
/* 大家族模板下折叠表格的定位处理
       FileInsertionDialog.prototype.initialize = function() {
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child {
         FileInsertionDialog.super.prototype.initialize.call(this);
   position: relative;
         this.panel = new OO.ui.PanelLayout({
   padding-right: 0;
           padded: true,
   padding-left: 0;
           expanded: false
}
         });
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible .mw-collapsible-toggle {
         this.fileMetaContent = new OO.ui.FieldsetLayout();
   margin-left: 0;
         this.alignmentContent = new OO.ui.FieldsetLayout();
}
         this.formatContent = new OO.ui.FieldsetLayout();
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > [style*="float:left"] {
         this.fileNameInput = new OO.ui.TextInputWidget({
   position: absolute;
           indicator: "required"
   left: 1em;
         });
   top: 0;
         this.fileNameField = new OO.ui.FieldLayout(this.fileNameInput, {
   float: none;
           label: mw.msg("wikieditor-toolbar-file-target"),
}
           align: "top"
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
         });
   position: absolute;
         this.fileTitleInput = new OO.ui.TextInputWidget();
   right: 1em;
         this.fileTitleField = new OO.ui.FieldLayout(this.fileTitleInput, {
   top: 0;
           label: mw.msg("wikieditor-toolbar-file-caption"),
   float: none;
           align: "top"
   margin-left: 0;
         });
}
         this.sizeInput = new OO.ui.TextInputWidget();
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle:last-child {
         this.sizeField = new OO.ui.FieldLayout(this.sizeInput, {
   position: static;
           label: mw.msg("wikieditor-toolbar-file-size"),
   float: right;
           align: "top"
   margin-right: -3.5em;
         });
} */
         this.fileMetaContent.addItems([this.fileNameField, this.fileTitleField, this.sizeField]);
/* wikitable 的 caption */
         var alignOptionDefault = new OO.ui.ButtonOptionWidget({
.wikitable.mw-collapsible caption {
           data: "default",
   border: 1px solid rgba(170, 170, 170, 0.37);
           label: mw.msg("wikieditor-toolbar-file-default"),
   border-bottom-width: 0;
           title: mw.msg("wikieditor-toolbar-file-default")
   background-color: rgb(249,249,249);
         });
}
         var alignOptionNone = new OO.ui.ButtonOptionWidget({
.wikitable.mw-collapsible.mw-collapsed caption {
           data: "none",
   border-bottom-width: 1px;
           label: mw.msg("wikieditor-toolbar-file-format-none"),
}
           title: mw.msg("wikieditor-toolbar-file-format-none")
/* vectorMenu 的排序 */
         });
div.vectorMenu ul {
         var magicWords = mw.config.get("wgWikiEditorMagicWords");
   display: flex;
         var alignOptionMid = new OO.ui.ButtonOptionWidget({
   flex-flow: column;
           data: "center",
}
           label: magicWords.img_center,
/* 分类页同开头的页面的列表不分段 */
           title: magicWords.img_center
.mw-category-group {
         });
   -webkit-column-break-inside: avoid;
         var alignOptionLeft = new OO.ui.ButtonOptionWidget({
   page-break-inside: avoid;
           data: "left",
   break-inside: avoid;
           label: magicWords.img_left,
}
           title: magicWords.img_left
.mw-category-group:nth-child(1):nth-last-child(1), /* 只有一个列表时 */
         });
.mw-category-group:nth-child(1):nth-last-child(2),  /* 只有两个列表时 */
         var alignOptionRight = new OO.ui.ButtonOptionWidget({
.mw-category-group:nth-child(2):nth-last-child(1) { /* 只有两个列表时 */
           data: "right",
   -webkit-column-break-inside: auto;
           label: magicWords.img_right,
   page-break-inside: auto;
           title: magicWords.img_right
   break-inside: auto;
         });
}
         this.alignmentSelect = new OO.ui.ButtonSelectWidget({
/* R18模板 */
           items: [alignOptionNone, alignOptionDefault, alignOptionMid, alignOptionLeft, alignOptionRight]
#x18 {
         });
   width: 100%;
         this.alignmentField = new OO.ui.FieldLayout(this.alignmentSelect, {
   height: 100%;
           label: mw.msg("wikieditor-toolbar-file-float"),
   position: fixed;
           align: "top"
   top: 0;
         });
   background: rgba(0, 0, 0, 0.9);
         this.alignmentContent.addItems([this.alignmentField]);
   z-index: 999;
         var formatOptionThumbnail = new OO.ui.ButtonOptionWidget({
   opacity: 0;
           data: "thumbnail",
}
           label: magicWords.img_thumbnail,
#x18Context {
           title: magicWords.img_thumbnail
   position: relative;
         });
   margin: 0 auto;
         var formatOptionFramed = new OO.ui.ButtonOptionWidget({
   margin-top: -40px;
           data: "framed",
   top: 50%;
           label: magicWords.img_framed,
   width: 240px;
           title: magicWords.img_framed
   height: 80px;
         });
   background: #444;
         var formatOptionFrameless = new OO.ui.ButtonOptionWidget({
   color: white;
           data: "frameless",
   border: solid 1px rgb(118, 195, 255);
           label: magicWords.img_frameless,
   border-radius: 4px;
           title: magicWords.img_frameless
   box-shadow: 0 0 5px rgb(118, 195, 255);
         });
   padding: 12px;
         var formatOptionNone = new OO.ui.ButtonOptionWidget({
}
           data: "default",
#x18Title {
           label: magicWords.img_none,
   margin: 12px;
           title: magicWords.img_none
}
         });
#x18Icon {
         this.formatSelect = new OO.ui.ButtonSelectWidget({
   position: relative;
           items: [formatOptionThumbnail, formatOptionFramed, formatOptionFrameless, formatOptionNone]
   border: 8px solid transparent;
         });
   border-left: 12px solid #fff;
         this.formatField = new OO.ui.FieldLayout(this.formatSelect, {
   float: left;
           label: mw.msg("wikieditor-toolbar-file-format"),
   margin: 2px 0;
           align: "top"
}
         });
.x18Button {
         this.formatContent.addItems([this.formatField]);
   text-align: center;
         this.panel.$element.append(this.fileMetaContent.$element);
}
         this.panel.$element.append(this.alignmentContent.$element);
.x18Button div {
         this.panel.$element.append(this.formatContent.$element);
   width: 72px;
         this.$body.append(this.panel.$element);
   height: 20px;
         this.fileNameInput.connect(this, {
   border-radius: 4px;
           change: "onFileNameChange"
   padding: 4px;
         });
   text-align: center;
       };
   font-size: 11pt;
       // Specify the dialog height (or don"t to use the automatically generated height).
   display: inline-block;
       FileInsertionDialog.prototype.getBodyHeight = function() {
   cursor: pointer;
         return this.panel.$element.outerHeight(true);
   box-shadow: #777 0 0 22px inset;
       };
}
       // Name validation
.x18Button div:nth-child(2) {
       FileInsertionDialog.prototype.onFileNameChange = function(value) {
   margin-left: 26px;
         this.actions.setAbilities({
}
           insert: !!value.length
#x18Yes {
         });
   background: rgb(57, 238, 0);
       };
}
       // Default state initialization
#x18No {
       FileInsertionDialog.prototype.getSetupProcess = function(data) {
    background: rgb(238, 48, 0);
         data = data || {};
}
         return FileInsertionDialog.super.prototype.getSetupProcess.call(this, data).next(function() {
           this.actions.setAbilities({
             insert: false
           });
           this.fileNameInput.setValue("");
           this.fileTitleInput.setValue("");
           this.sizeInput.setValue("");
           this.alignmentSelect.selectItemByData("default");
           this.formatSelect.selectItemByData("thumbnail");
         }, this);
       };
       // Context setup
       FileInsertionDialog.prototype.setContext = function(context) {
         this.editorContext = context;
       };
       // Specify processes to handle the actions.
       FileInsertionDialog.prototype.getActionProcess = function(action) {
         if (action === "insert") {
           return new OO.ui.Process(function() {
             this.insertImage();
           }, this);
         }
         // Fallback to parent handler
         return FileInsertionDialog.super.prototype.getActionProcess.call(this, action);
       };
       // Handles image insertion.
       FileInsertionDialog.prototype.insertImage = function() {
         if (!this.editorContext) return;
         var fileName, caption, fileFloat, fileFormat, fileSize, fileTitle, options, fileUse, hasPxRgx = /.+px$/,
           magicWordsI18N = mw.config.get("wgWikiEditorMagicWords");
         fileName = this.fileNameInput.getValue();
         caption = this.fileTitleInput.getValue();
         fileSize = this.sizeInput.getValue();
         fileFloat = this.alignmentSelect.getSelectedItem().data;
         fileFormat = this.formatSelect.getSelectedItem().data;
         // Append px to end to size if not already contains it
         if (fileSize !== "" && !hasPxRgx.test(fileSize)) {
           fileSize += "px";
         }
         if (fileName !== "") {
           fileTitle = new mw.Title(fileName);
           // Append file namespace prefix to filename if not already contains it
           if (fileTitle.getNamespaceId() !== 6) {
             fileTitle = new mw.Title(fileName, 6);
           }
           fileName = fileTitle.toText();
         }
         options = [fileSize, fileFormat, fileFloat];
         // Filter empty values
         options = $.grep(options, function(val) {
           return val.length && val !== "default";
         });
         if (caption.length) {
           options.push(caption);
         }
         fileUse = options.length === 0 ? fileName : fileName + "|" + options.join("|");
         $.wikiEditor.modules.toolbar.fn.doAction(this.editorContext, {
           type: "replace",
           options: {
             pre: "[[",
             peri: fileUse,
             post: "]]",
             ownline: true
           }
         });
         this.close();
       };
       // Remove legacy file insertion
       $("#wpTextbox1").wikiEditor("removeFromToolbar", {
         section: "main",
         group: "insert",
         tool: "file"
       });
       $("#wpTextbox1").wikiEditor("addToToolbar", {
         section: "main",
         group: "insert",
         tools: {
           "file-alt": {
             label: mw.msg("wikieditor-toolbar-tool-file-title"),
             type: "button",
             icon: "https://img.moegirl.org/common/3/3e/Insert-file.svg",
             offset: [2, -1438],
             action: {
               type: "callback",
               execute: function(context) {
                 var windowManager = new OO.ui.WindowManager();
                 $("body").append(windowManager.$element);
                 var fileInsertionDialog = new FileInsertionDialog();
                 fileInsertionDialog.setContext(context);
                 windowManager.addWindows([fileInsertionDialog]);
                 windowManager.openWindow(fileInsertionDialog);
               }
             }
           }
         }
       });
     });
    });
});

2020年5月23日 (六) 14:18的版本

/* Any JavaScript here will be loaded for all users on edit page load. */
$(function() {
    var wpSummary = $('[name="wpSummary"]');
    // $(".mw-summary-preset-item a").closest('.oo-ui-fieldLayout-header').width($('#wpSummary').width());
    $(".mw-summary-preset-item a").on("click", function() {
        wpSummary.val(wpSummary.val() + " " + $(this).text());
        wpSummary.focus();
        return false;
    });

    // .wikiEditor-ui-controls 颜色修正
    $('.wikiEditor-ui-controls').css('background-color', $('#content').css('background-color'));

    //编辑提示检查
    if ($(".mw-summary-preset")[0]) {
        $(".CheckNewSectionOn").hide();
    } else {
        $(".CheckNewSectionOff").hide();
        $('.headerInputbox a[href*="preload=Template%3A权限申请%2F"]').attr("target", "_self");
    }

    if ($(".AbusefilterWarningNoHttp")[0]) {
        $("#wpTextbox1").val($("#wpTextbox1").val().replace(/http:\/\/([a-z\d]+\.bilibili\.[a-z\d]+)/ig, "https://$1"));
    }

    // Customized File Insertion dialog
    // Copyright 2017 The Little Moe New LLC. All rights reserved.
    mw.loader.using(["oojs", "oojs-ui"]).then(function() {
        $("#wpTextbox1").on("wikiEditor-toolbar-doneInitialSections", function() {
            function FileInsertionDialog(config) {
                FileInsertionDialog.super.call(this, config);
            }
            OO.inheritClass(FileInsertionDialog, OO.ui.ProcessDialog);
            // Name
            FileInsertionDialog.static.name = "fileInsertionDialog";
            FileInsertionDialog.static.title = mw.msg("wikieditor-toolbar-tool-file-title");
            FileInsertionDialog.static.actions = [{
                flags: "primary",
                label: mw.msg("wikieditor-toolbar-tool-file-insert"),
                action: "insert"
            }, {
                flags: "safe",
                label: mw.msg("wikieditor-toolbar-tool-file-cancel")
            }];
            // Initialization
            FileInsertionDialog.prototype.initialize = function() {
                FileInsertionDialog.super.prototype.initialize.call(this);
                this.panel = new OO.ui.PanelLayout({
                    padded: true,
                    expanded: false
                });
                this.fileMetaContent = new OO.ui.FieldsetLayout();
                this.alignmentContent = new OO.ui.FieldsetLayout();
                this.formatContent = new OO.ui.FieldsetLayout();
                this.fileNameInput = new OO.ui.TextInputWidget({
                    indicator: "required"
                });
                this.fileNameField = new OO.ui.FieldLayout(this.fileNameInput, {
                    label: mw.msg("wikieditor-toolbar-file-target"),
                    align: "top"
                });
                this.fileTitleInput = new OO.ui.TextInputWidget();
                this.fileTitleField = new OO.ui.FieldLayout(this.fileTitleInput, {
                    label: mw.msg("wikieditor-toolbar-file-caption"),
                    align: "top"
                });
                this.sizeInput = new OO.ui.TextInputWidget();
                this.sizeField = new OO.ui.FieldLayout(this.sizeInput, {
                    label: mw.msg("wikieditor-toolbar-file-size"),
                    align: "top"
                });
                this.fileMetaContent.addItems([this.fileNameField, this.fileTitleField, this.sizeField]);
                var alignOptionDefault = new OO.ui.ButtonOptionWidget({
                    data: "default",
                    label: mw.msg("wikieditor-toolbar-file-default"),
                    title: mw.msg("wikieditor-toolbar-file-default")
                });
                var alignOptionNone = new OO.ui.ButtonOptionWidget({
                    data: "none",
                    label: mw.msg("wikieditor-toolbar-file-format-none"),
                    title: mw.msg("wikieditor-toolbar-file-format-none")
                });
                var magicWords = mw.config.get("wgWikiEditorMagicWords");
                var alignOptionMid = new OO.ui.ButtonOptionWidget({
                    data: "center",
                    label: magicWords.img_center,
                    title: magicWords.img_center
                });
                var alignOptionLeft = new OO.ui.ButtonOptionWidget({
                    data: "left",
                    label: magicWords.img_left,
                    title: magicWords.img_left
                });
                var alignOptionRight = new OO.ui.ButtonOptionWidget({
                    data: "right",
                    label: magicWords.img_right,
                    title: magicWords.img_right
                });
                this.alignmentSelect = new OO.ui.ButtonSelectWidget({
                    items: [alignOptionNone, alignOptionDefault, alignOptionMid, alignOptionLeft, alignOptionRight]
                });
                this.alignmentField = new OO.ui.FieldLayout(this.alignmentSelect, {
                    label: mw.msg("wikieditor-toolbar-file-float"),
                    align: "top"
                });
                this.alignmentContent.addItems([this.alignmentField]);
                var formatOptionThumbnail = new OO.ui.ButtonOptionWidget({
                    data: "thumbnail",
                    label: magicWords.img_thumbnail,
                    title: magicWords.img_thumbnail
                });
                var formatOptionFramed = new OO.ui.ButtonOptionWidget({
                    data: "framed",
                    label: magicWords.img_framed,
                    title: magicWords.img_framed
                });
                var formatOptionFrameless = new OO.ui.ButtonOptionWidget({
                    data: "frameless",
                    label: magicWords.img_frameless,
                    title: magicWords.img_frameless
                });
                var formatOptionNone = new OO.ui.ButtonOptionWidget({
                    data: "default",
                    label: magicWords.img_none,
                    title: magicWords.img_none
                });
                this.formatSelect = new OO.ui.ButtonSelectWidget({
                    items: [formatOptionThumbnail, formatOptionFramed, formatOptionFrameless, formatOptionNone]
                });
                this.formatField = new OO.ui.FieldLayout(this.formatSelect, {
                    label: mw.msg("wikieditor-toolbar-file-format"),
                    align: "top"
                });
                this.formatContent.addItems([this.formatField]);
                this.panel.$element.append(this.fileMetaContent.$element);
                this.panel.$element.append(this.alignmentContent.$element);
                this.panel.$element.append(this.formatContent.$element);
                this.$body.append(this.panel.$element);
                this.fileNameInput.connect(this, {
                    change: "onFileNameChange"
                });
            };
            // Specify the dialog height (or don"t to use the automatically generated height).
            FileInsertionDialog.prototype.getBodyHeight = function() {
                return this.panel.$element.outerHeight(true);
            };
            // Name validation
            FileInsertionDialog.prototype.onFileNameChange = function(value) {
                this.actions.setAbilities({
                    insert: !!value.length
                });
            };
            // Default state initialization
            FileInsertionDialog.prototype.getSetupProcess = function(data) {
                data = data || {};
                return FileInsertionDialog.super.prototype.getSetupProcess.call(this, data).next(function() {
                    this.actions.setAbilities({
                        insert: false
                    });
                    this.fileNameInput.setValue("");
                    this.fileTitleInput.setValue("");
                    this.sizeInput.setValue("");
                    this.alignmentSelect.selectItemByData("default");
                    this.formatSelect.selectItemByData("thumbnail");
                }, this);
            };
            // Context setup
            FileInsertionDialog.prototype.setContext = function(context) {
                this.editorContext = context;
            };
            // Specify processes to handle the actions.
            FileInsertionDialog.prototype.getActionProcess = function(action) {
                if (action === "insert") {
                    return new OO.ui.Process(function() {
                        this.insertImage();
                    }, this);
                }
                // Fallback to parent handler
                return FileInsertionDialog.super.prototype.getActionProcess.call(this, action);
            };
            // Handles image insertion.
            FileInsertionDialog.prototype.insertImage = function() {
                if (!this.editorContext) return;
                var fileName, caption, fileFloat, fileFormat, fileSize, fileTitle, options, fileUse, hasPxRgx = /.+px$/,
                    magicWordsI18N = mw.config.get("wgWikiEditorMagicWords");
                fileName = this.fileNameInput.getValue();
                caption = this.fileTitleInput.getValue();
                fileSize = this.sizeInput.getValue();
                fileFloat = this.alignmentSelect.getSelectedItem().data;
                fileFormat = this.formatSelect.getSelectedItem().data;
                // Append px to end to size if not already contains it
                if (fileSize !== "" && !hasPxRgx.test(fileSize)) {
                    fileSize += "px";
                }
                if (fileName !== "") {
                    fileTitle = new mw.Title(fileName);
                    // Append file namespace prefix to filename if not already contains it
                    if (fileTitle.getNamespaceId() !== 6) {
                        fileTitle = new mw.Title(fileName, 6);
                    }
                    fileName = fileTitle.toText();
                }
                options = [fileSize, fileFormat, fileFloat];
                // Filter empty values
                options = $.grep(options, function(val) {
                    return val.length && val !== "default";
                });
                if (caption.length) {
                    options.push(caption);
                }
                fileUse = options.length === 0 ? fileName : fileName + "|" + options.join("|");
                $.wikiEditor.modules.toolbar.fn.doAction(this.editorContext, {
                    type: "replace",
                    options: {
                        pre: "[[",
                        peri: fileUse,
                        post: "]]",
                        ownline: true
                    }
                });
                this.close();
            };
            // Remove legacy file insertion
            $("#wpTextbox1").wikiEditor("removeFromToolbar", {
                section: "main",
                group: "insert",
                tool: "file"
            });
            $("#wpTextbox1").wikiEditor("addToToolbar", {
                section: "main",
                group: "insert",
                tools: {
                    "file-alt": {
                        label: mw.msg("wikieditor-toolbar-tool-file-title"),
                        type: "button",
                        icon: "https://img.moegirl.org/common/3/3e/Insert-file.svg",
                        offset: [2, -1438],
                        action: {
                            type: "callback",
                            execute: function(context) {
                                var windowManager = new OO.ui.WindowManager();
                                $("body").append(windowManager.$element);
                                var fileInsertionDialog = new FileInsertionDialog();
                                fileInsertionDialog.setContext(context);
                                windowManager.addWindows([fileInsertionDialog]);
                                windowManager.openWindow(fileInsertionDialog);
                            }
                        }
                    }
                }
            });
        });
    });
});