注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
var thisHref = window.location.href
/* Wikiplus */
mw.loader.load('https://wikiplus-app.com/Main.js')

/* 部分链接新窗口打开 */
addTarget("mw-changeslist-title")
addTarget("mw-changeslist-diff")
addTarget("mw-changeslist-diff-cur")
addTarget("mw-changeslist-groupdiff")
addTarget("mw-changeslist-history")
addTarget("mw-userlink")

function addTarget (obj) {
    var a_mct = document.getElementsByClassName(obj);
    for (var i = a_mct.length - 1; i >= 0; i--) {
        a_mct[i].setAttribute("target","_blank")
    };
}

$('#p-personal ul').append('<li><a href="?action=purge">强制刷新</a><li>')
$('#p-personal ul').append('<li><a href="https://mcbbs-wiki.cn/index.php?title=用户:QWERTY_52_38/common.js">js</a></li>')
$('#p-personal ul').append('<li><a href="https://mcbbs-wiki.cn/index.php?title=用户:QWERTY_52_38/common.css">css</a></li>')
$('#p-personal ul').append('<li><a href="?action=info">info</a></li>');

// 取自 https://minecraft-zh.gamepedia.com/User:Ff98sha/common.js,仅供学习研究用
mw.loader.using(['oojs-ui-windows', 'oojs-ui-core'],
function() {
  $('.mw-rollback-link a').each(function() {
    var href = $(this).attr('href');
    $(this).click(function(e) {
      e.preventDefault();
      OO.ui.confirm('你确定要回退此页面吗?').done(function(confirmed) {
        if (confirmed) { location.href = href; }
      });
    });
  });
});