MS Learn and MDN always in EN-US

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

  1. // ==UserScript==
  2. // @name MS Learn and MDN always in EN-US
  3. // @namespace mslearn_to_enus
  4. // @description Redirect learn.microsoft.com and developer.mozilla.org to en-us version
  5. // @icon https://learn.microsoft.com/favicon.ico
  6. // @match *://learn.microsoft.com/*
  7. // @match *://developer.mozilla.org/*
  8. // @version 1.0.0
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. var path = location.pathname.split('/');
  14. if (path[1].toLowerCase()!='en-us')
  15. {
  16. if (location.hostname.toLowerCase()=='learn.microsoft.com') path[1] = 'en-us'
  17. else path[1] = 'en-US';
  18. location.pathname = path.join('/');
  19. }

QingJ © 2025

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