Last active
October 5, 2022 10:11
-
-
Save poke/443691326ead282667e12ddb3165f103 to your computer and use it in GitHub Desktop.
[User script] Microsoft Docs: Force English
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id microsoft-docs-force-english@poke | |
// @name Microsoft Docs: Force English | |
// @description Force Microsoft Docs and MDN to be displayed in English, regardless of the browser’s locale settings. | |
// @namespace poke | |
// @version 3.0.0 | |
// @author Patrick Westerhoff | |
// @grant none | |
// @include https://docs.microsoft.com/* | |
// @include https://learn.microsoft.com/* | |
// @include https://developer.mozilla.org/* | |
// @homepageURL https://gist.github.com/poke/443691326ead282667e12ddb3165f103 | |
// @updateURL https://gist.github.com/poke/443691326ead282667e12ddb3165f103/raw/microsoft-docs-force-english.user.js | |
// ==/UserScript== | |
const parts = window.location.pathname.match(/^\/([a-z]{2}(?:-[a-z]{2})?)\/(.*?)$/); | |
if (!parts[1].startsWith('en')) { | |
window.location.pathname = '/en/' + parts[2]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment