JumpToNewMinecraftWiki

J2n_MC_wiki - 新·我的世界中文wiki跳转|刷新界面|重定向Fandom的url

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         JumpToNewMinecraftWiki
// @author       萌萌哒丶九灬书
// @description  J2n_MC_wiki - 新·我的世界中文wiki跳转|刷新界面|重定向Fandom的url
// @namespace    https://space.bilibili.com/1501743
// @license      GNU General Public License v3.0
// @version      0.0.3
// @create       2023-11-11
// @lastmodified 2023-11-12
// @include      /^https?:\/\/zh\.minecraftwiki\.net/
// @include      /^https?:\/\/minecraft\-zh\.gamepedia\.com/
// @include      /^https?:\/\/minecraft\.fandom\.com/
// @mainpage     https://greasyfork.org/zh-CN/scripts/479549/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    (window.location.pathname.substr(0,3)=='/zh')?((window.location.pathname.substr(8)=='/Minecraft_Wiki')?(window.location.replace(`https://zh.minecraft.wiki/`)):(window.location.replace(`https://zh.minecraft.wiki/w${window.location.pathname.substr(8)}/`))):((window.location.pathname.substr(5)=='/Minecraft_Wiki')?(window.location.replace(`https://minecraft.wiki/`)):(window.location.replace(`https://minecraft.wiki/w${window.location.pathname.substr(5)}/`)));
})();