Greasy Fork

BMJ Best Practice EN to CN

redirect en-gb webpage to zh-cn webpage

目前为 2022-10-02 提交的版本。查看 最新版本

// ==UserScript==
// @name         BMJ Best Practice EN to CN
// @version      1.00
// @author       sprindjack
// @namespace    sprindjack
// @description  redirect en-gb webpage to zh-cn webpage
// @license      AGPL-3.0-or-later
// @match        *://bestpractice.bmj.com/topics/en-gb/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

var newUrlPath = window.location.pathname.replace('en-gb','zh-cn');
var newURL = window.location.protocol + "//"
           + window.location.host
           + newUrlPath
           + window.location.search
           + window.location.hash
           ;
window.location.replace (newURL);