Skip to content

Instantly share code, notes, and snippets.

@MrRoundRobin
Last active February 18, 2018 11:17
Show Gist options
  • Select an option

  • Save MrRoundRobin/c07dc01457a6c9f927cf885d70de2d6b to your computer and use it in GitHub Desktop.

Select an option

Save MrRoundRobin/c07dc01457a6c9f927cf885d70de2d6b to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Windwos IT Pro Force English
// @include /^https?://(docs|msdn|technet|support|developer)\.microsoft\.com/[a-z]{2}-[a-z]{2}//
// @include /^https?://support.office.com/[a-z]{2}-[a-z]{2}//
// @run-at document-start
// @icon https://www.microsoft.com/favicon.ico
// @grant none
// @downloadURL https://gist.github.com/MrRoundRobin/c07dc01457a6c9f927cf885d70de2d6b/raw/WindowsITProForceEnglish.user.js
// @updateURL https://gist.github.com/MrRoundRobin/c07dc01457a6c9f927cf885d70de2d6b/raw/WindowsITProForceEnglish.user.js
// @version 2.0
// @description Redirects to english version of MSDN, TechNet, Microsoft Support, etc.
// @author RoundRobin
// ==/UserScript==
if (!window.location.pathname.startsWith('/en-us')
&& window.location.search.indexOf("language=force") == -1) {
window.location.pathname = window.location.pathname.replace(/\/(\w{2}-\w{2})\//, "/en-us/");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment