Last active
February 27, 2024 10:04
-
-
Save cheanrod/8d5a43cfce59964312454a55a8aac3f8 to your computer and use it in GitHub Desktop.
Learn Detour
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== | |
// @name Learn Detour | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-02-25 | |
// @description try to take over the world! | |
// @author You | |
// @match https://learn.microsoft.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=microsoft.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Check if the current URL starts with the specified path | |
if (window.location.href.startsWith("https://learn.microsoft.com/de-de")) { | |
// Extract the remaining part of the URL | |
var remainingPath = window.location.href.substring("https://learn.microsoft.com/de-de".length); | |
// Rewrite the URL by appending the remaining path to the new base URL | |
window.location.href = "https://learn.microsoft.com/en-us" + remainingPath; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment