流亡编年史自动切换中文简体

如名称所描述一样

// ==UserScript==
// @name         流亡编年史自动切换中文简体
// @namespace    http://tampermonkey.net/
// @version      0.1
// @license      MIT
// @description  如名称所描述一样
// @author       Kirito7
// @match        https://poedb.tw/us/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=poedb.tw
// @grant        none
// @run-at       document-start
// ==/UserScript==

var reg = /(https:\/\/poedb.tw)\/.*\/([A-Za-z0-9_]*)/;
var match = document.location.href.match(reg);
if(match){document.location.href = match[1] + "/cn/" +match[2];}