MCBBS Wiki欢迎您共同参与编辑!在参与编辑之前请先阅读Wiki方针

如果在编辑的过程中遇到了什么问题,可以去讨论板提问。

为了您能够无阻碍地参与编辑 未验证/绑定过邮箱的用户,请尽快绑定/验证

MCBBS Wiki GitHub群组已上线!

您可以在回声洞中发表吐槽!

服务器状态监控。点击进入

本站由MCBBS用户自行搭建,与MCBBS及东银河系漫游指南(北京)科技有限公司没有从属关系。点此了解 MCBBS Wiki 不是什么>>

用户:自由李代数/common.js:修订间差异

来自MCBBS Wiki
跳到导航 跳到搜索
无编辑摘要
标签移动版编辑 移动版网页编辑
无编辑摘要
标签移动版编辑 移动版网页编辑
 
(未显示同一用户的65个中间版本)
第1行: 第1行:
/* Wikiplus */
/* 我写的,初期开发,不建议用 */
mw.loader.load('https://wikiplus-app.com/Main.js')
mw.loader.load('https://cdn.jsdelivr.net/gh/FreeLieAlgebra/MCBBS-Wiki-Helper/MBWH0.8.0.js');


/* preload-code */
/* 暂时取自 https://minecraft-zh.gamepedia.com/User:Ff98sha/common.js,仅供学习研究用 */
function getTitle() {
mw.loader.using(['oojs-ui-windows', 'oojs-ui-core'],
    var url = document.querySelector('#ca-view a').getAttribute('href');
function() {
    return url.slice(url.indexOf('/wiki/')+6);
  $('.mw-rollback-link a').each(function() {
}
    var href = $(this).attr('href');
 
    $(this).click(function(e) {
var title, res1
      e.preventDefault();
title = getTitle()
      OO.ui.confirm('你确定要回退此页面吗?').done(function(confirmed) {
res1 = "https://mcbbs-wiki.cn/wiki/Special:WhatLinksHere/" + title
        if (confirmed) {
 
          location.href = href;
/* 右上角添加 */
        }
$('#p-personal ul').append('<li><a href="?action=purge">强制刷新</a></li>')
      });
$('#p-personal ul').append('<li><a href="?action=info">info</a></li>')
    });
$('#p-personal ul').append('<li><a href="' + res1 + '">WhatLinksHere</a></li>')
  });
 
});
/* 手机版编辑栏添加 */
$('#page-actions').append('<li id="ca-purge"><a href="?action=purge"><img src="https://mcbbs-wiki.cn/wiki/%E6%96%87%E4%BB%B6:Diamond_Pickaxe_JE3_BE3.png"/></a></li>')
$('#page-actions').append('<li><a href="?action=info">info</a></li>')
$('#page-actions').append('<li><a href="' + res1 + '">WLH</a></li>')
//<li id="ca-edit" class="mw-ui-icon mw-ui-icon-element mw-ui-icon-minerva-edit-enabled" title="编辑此页面的序言章节"><a href="/index.php?title=%E7%94%A8%E6%88%B7:%E8%87%AA%E7%94%B1%E6%9D%8E%E4%BB%A3%E6%95%B0/common.js&amp;action=edit">编辑</a></li>

2021年1月3日 (日) 20:01的最新版本

/* 我写的,初期开发,不建议用 */
mw.loader.load('https://cdn.jsdelivr.net/gh/FreeLieAlgebra/MCBBS-Wiki-Helper/MBWH0.8.0.js');

/* 暂时取自 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;
        }
      });
    });
  });
});