MS Learn and MDN always in EN-US

Redirect learn.microsoft.com and developer.mozilla.org to en-us version

// ==UserScript==
// @name        MS Learn and MDN always in EN-US
// @namespace   mslearn_to_enus
// @description Redirect learn.microsoft.com and developer.mozilla.org to en-us version
// @icon        https://learn.microsoft.com/favicon.ico
// @match       *://learn.microsoft.com/*
// @match       *://developer.mozilla.org/*
// @version     1.0.0
// @grant       none
// @license MIT
// ==/UserScript==

var path = location.pathname.split('/');
if (path[1].toLowerCase()!='en-us')
{
    if (location.hostname.toLowerCase()=='learn.microsoft.com') path[1] = 'en-us'
        else path[1] = 'en-US';
    location.pathname = path.join('/');
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址