MediaWiki:MercuryPreview/code.js

/** $('.wds-community-header__wiki-buttons .wds-dropdown__content .wds-list').append( // 添加按钮  $('')  .append( $('') .attr({     'href': '#',      'id': 'MercuryPreview'    }) .html('View Mobile version for this page') .click(function {      // 预览区域的内容      var MercuryPreviewHeader = 'Mercury Preview';      var MercuryPreviewBody =      $(' ')      .attr('id','MercuryPreviewBody')      .append( $(' ')       .attr({          id : "MercuryPreviewBoxIframe",          src : "?useskin=mercury"        }) .css({         'width' : '420px',          'height' : '850px',          'margin' : '0 auto',          'background-image' : 'url(https://vignette.wikia.nocookie.net/dev/images/4/42/Loading.gif/revision/latest?cb=20120218000406)',          'background-repeat' : 'no-repeat',          'background-position' : 'center'        }) );     // 调出wds弹窗      $.showCustomModal(MercuryPreviewHeader, MercuryPreviewBody, { id: 'MercuryPreviewBox', width: 600, buttons: [{ id: 'CloseMercuryPreview', message: '关闭', handler: function { $('#MercuryPreviewBox').closeModal; }       }, ]      });      // 小屏幕手机响应式优化      if ($(window).width < 850) {        $('#MercuryPreviewBox').css({ 'width': $(document).width * 0.8, 'height': 'auto' }).offset({ left: $(document).width / 10 });       $('#MercuryPreviewBoxIframe').css({ 'width': '90%' })     };    })  ) );
 * Name : Mercury Preview
 * Author : 机智的小鱼君
 * Logs :
 * 06:08, March 27, 2019 (UTC):Alpha ver. post