JumpToNewMinecraftWiki

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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)}/`)));
})();