Greasy Fork is available in English.

Minecraft Wiki Redirect

Redirect Fandom and other front ends to minecraft.wiki

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Minecraft Wiki Redirect
// @description Redirect Fandom and other front ends to minecraft.wiki
// @match       *://*.fandom.com/wiki/*
// @match       *://*.breezewiki.com/minecraft/wiki/*
// @match       *://*.antifandom.com/minecraft/wiki/*
// @grant       none
// @run-at      document-start
// @license     WTFPL
// @version 0.0.1.20240228135822
// @namespace https://greasyfork.org/users/1268060
// ==/UserScript==

let destination = 'minecraft.wiki/w';
let sources = ['minecraft.fandom.com/wiki', 'breezewiki.com/minecraft/wiki', 'antifandom.com/minecraft/wiki'];
let currentURL = window.location.href;

for (let source of sources) {
    if (currentURL.includes(source)) {
        window.location.replace(currentURL.replace(source, destination));
        break;
    }
}